File tree Expand file tree Collapse file tree 1 file changed +5
-11
lines changed
Expand file tree Collapse file tree 1 file changed +5
-11
lines changed Original file line number Diff line number Diff line change @@ -262,18 +262,12 @@ if defined? JRUBY_VERSION
262262 end
263263
264264 classpath = [ ]
265- [ 'java.class.path' , 'sun.boot.class.path' ] . map { |key | ENV_JAVA [ key ] } . each do |v |
266- classpath += v . split ( File ::PATH_SEPARATOR ) . find_all { |jar | jar =~ /jruby/i } if v
265+ require 'rbconfig'
266+ libdir = RbConfig ::CONFIG [ 'libdir' ]
267+ if libdir . start_with? 'classpath:'
268+ error "Cannot build activerecord-jdbc with jruby-complete"
267269 end
268- # Using Java 9+. Let's try and infer jruby.jar location from rbconfig
269- if classpath . empty? ; require 'rbconfig'
270- libdir = RbConfig ::CONFIG [ 'libdir' ]
271- if libdir . start_with? 'classpath:'
272- error "Cannot build activerecord-jdbc with jruby-complete"
273- end
274- classpath << File . join ( libdir , 'jruby.jar' )
275- end
276-
270+ classpath << File . join ( libdir , 'jruby.jar' )
277271 classpath += driver_jars
278272 classpath = classpath . compact . join ( File ::PATH_SEPARATOR )
279273
You can’t perform that action at this time.
0 commit comments