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

Adding directories to Gem.path doesn't work with 9.2.0.0 #5269

Closed
pajswigger opened this issue Aug 1, 2018 · 5 comments
Closed

Adding directories to Gem.path doesn't work with 9.2.0.0 #5269

pajswigger opened this issue Aug 1, 2018 · 5 comments

Comments

@pajswigger
Copy link

pajswigger commented Aug 1, 2018

Environment

  • JRuby 9.2.0.0

Expected Behavior

JRuby 9.1.17.0 works as expected:

Pauls-Mac-Pro:gems paul$ java -jar ~/jruby-complete-9.1.17.0.jar
Gem.path.unshift('/Users/paul/gems')
require 'find_a_port'

[no error messages]

Actual Behavior

Pauls-Mac-Pro:gems paul$ java -jar ~/jruby-complete-9.2.0.0.jar
Gem.path.unshift('/Users/paul/gems')
require 'find_a_port'
LoadError: no such file to load -- find_a_port
  require at org/jruby/RubyKernel.java:970
  require at uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_require.rb:59
   <main> at -:2

If you specify the path using the GEM_PATH environment variable it works correctly on 9.2.

@headius
Copy link
Member

headius commented Aug 16, 2018

Huh, this is unexpected. We ship a standard copy of RubyGems in JRuby, so I have no theories as to why this is suddenly not working. Did RubyGems break it perhaps?

[] ~/projects/jruby $ rvm jruby-9.1.17.0 do gem -v
2.6.14.1

[] ~/projects/jruby $ rvm jruby-9.2.0.0 do gem -v
2.7.6

[] ~/projects/jruby $ jruby -v
jruby 9.2.1.0-SNAPSHOT (2.5.0) 2018-08-15 1ffc9ba Java HotSpot(TM) 64-Bit Server VM 25.181-b13 on 1.8.0_181-b13 +jit [darwin-x86_64]

[] ~/projects/jruby $ gem -v
2.7.6

You might also test with JRuby master using our [snapshot build] but I would be surprised if it is fixed there.

@dennis-d
Copy link

@headius where can I get a snapshot build?

@kares
Copy link
Member

kares commented Aug 24, 2018

@dennis-d http://jruby.org/nightly (Development)

not sure how to reproduce this one successfully on 9.1.17.0 - trying to manually add Gem.path doesn't really work, any hints what I am missing out? thinking this might be the root cause for jruby/warbler#432

@kares kares added this to the JRuby 9.2.1.0 milestone Sep 25, 2018
@headius
Copy link
Member

headius commented Oct 11, 2018

Bumping this to 9.2.2 since we have not heard back recently based on snapshot builds. This may be fixed, but if it is not I believe it's too late to try to fix it in 9.2.1.

@headius
Copy link
Member

headius commented Dec 18, 2018

No follow-up and since we ship RubyGems unmodified I don't think this would be our bug. Reopen or re-report if it's still an issue in JRuby 9.2.5.

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

5 participants