Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
require_relative fails when called from classpath:/ path file on Windows in JRuby 1.7.9 #1374
This commit 429149e introduced the following issue in JRuby 1.7.9 when running JRuby from jruby-complete-1.7.9.jar on Windows:
As a result requiring "openssl" fails. When the mentioned commit is reverted then it is working fine.
The cause for this issue is that
This issue is similar to https://jira.codehaus.org/browse/JRUBY-7122 which was fixed by https://github.com/jruby/jruby/pull/674/files. But currently
irb(main):003:0> File.expand_path("classpath:/META-INF/jruby.home/lib/ruby/shared/krypt.rb") => "classpath:/META-INF/jruby.home/lib/ruby/shared/krypt.rb" irb(main):004:0> File.expand_path("krypt.rb", "classpath:/META-INF/jruby.home/lib/ruby/shared") => "classpath:C:/META-INF/jruby.home/lib/ruby/shared/krypt.rb"
So it would be good to fix
I am having a similar issue: trying to deploy the exact same jar file (created by warbler [gemjar]) which is containing the 'xml-smart' gem (in addition to the gems this gems depends on) any files within the 'xml-smart' gem folder (within the jar) cannot be loaded under WINDOWS/CYGWIN (when launching the resulting jar file via: java -jar <JAL_FILE>) although everything works perfectly under linux.
I reverted this change now. So things should be working as before in 1.7.8. I was going to fix File.expand_path but once I got into it I found a bunch of other ambiguous corner cases. Hopefully for 1.7.11 I can reapply this fix and also better spec out File.expand_path for the uri-type things only JRuby supports.