Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gem lookup problem when warbling on Windows #4653

Closed
jasonrclark opened this issue Jun 8, 2017 · 4 comments
Closed

Gem lookup problem when warbling on Windows #4653

jasonrclark opened this issue Jun 8, 2017 · 4 comments

Comments

@jasonrclark
Copy link

Environment

Provide at least:

  • JRuby version (jruby -v) and command line (flags, JRUBY_OPTS, etc)

    • Building with jruby-jars for 9.1.10.0 on Mac (jruby 9.1.8.0 (2.3.1) 2017-03-06 90fc7ab Java HotSpot(TM) 64-Bit Server VM 25.121-b13 on 1.8.0_121-b13 [darwin-x86_64])
    • running resulting jar on Windows (so using embedded jruby-jar components) rather than installed JRuby
  • Operating system and platform (e.g. uname -a)
    Running jars on MSYS_NT-6.1 IE11Win7 2.6.0(0.304/5/3) 2016-09-09 09:32 i686 Msys

Other relevant info you may wish to add:

Expected Behavior

A standalone jar built with warbler should load the embedded gems when running on Windows.

Actual Behavior

A standalone warbled jar can't load the embedded gems when running with JRuby 9.1.10.0's jruby-jars vs JRuby 9.1.8.0 when on Windows.

A sample repo is available at https://github.com/jasonrclark/tale-of-two-warbles that demonstrates the problem and has both versions side-by-side for demonstration.

This was found in Shoes during testing for our next pre-release.

The exact error is a typical LoadError:

LoadError: no such file to load -- active_support
  require at org/jruby/RubyKernel.java:961
  require at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:130
   <main> at uri:classloader:/9.1.10.0/app.rb:3
     load at org/jruby/RubyKernel.java:979
   <main> at uri:classloader:/META-INF/main.rb:1
  require at org/jruby/RubyKernel.java:961
   (root) at uri:classloader:/META-INF/main.rb:1
   <main> at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:1

The Gem.paths.path in both working (9.1.8.0) and non-working (9.1.10.0) cases are the same:

C:/Users/IEUser/.gem/jruby/2.3.0
uri:classloader:/META-INF/jruby.home/lib/ruby/gems/shared
uri:classloader:

I'm mildly suspicious that it could be related to #4543 which relates to how classloader paths are handled, and happened in the right version range. Could potentially also be something with the new Rubygems that 9.1.9.0 (and hence 9.1.10.0) pulled in.

@mprins
Copy link
Contributor

mprins commented Jun 8, 2017

may be fixed with #4647

@jasonrclark
Copy link
Author

That looks like it's almost certainly the same thing. Thinking back I suspect I searched only open issues... doh! Thanks.

@headius
Copy link
Member

headius commented Jun 8, 2017

@jasonrclark If you get a chance, verify with JRuby master. Thanks for the update!

@headius headius closed this as completed Jun 8, 2017
@headius headius added this to the Invalid or Duplicate milestone Jun 8, 2017
@PragTob PragTob mentioned this issue Jun 15, 2017
17 tasks
@jasonrclark
Copy link
Author

@headius Didn't get to checking on master, but did bump to 9.1.11.0 and everything works smoothly. Thanks @kares for the quick fix! ✨

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants