Skip to content

jruby-rack adjust_gem_path has no effect #3828

@mkristian

Description

@mkristian

Environment

when investigating the broken j2ee tests on travis it shows that the ENV['GEM_PATH'] set by jruby-rack has no effect on Gem.path and so does not show up in the testcase.

Expected Behavior

jruby does not call Gem.path before requiring a file outside the core.

Actual Behavior

[INFO]  uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems.rb:403:in `path'
[INFO]  uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/dependency.rb:316:in `to_specs'
[INFO]  uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/dependency.rb:330:in `to_spec'
[INFO]  uri:classloader:/META-INF/jruby.home/lib/ruby/stdlib/rubygems/core_ext/kernel_gem.rb:65:in `gem'
[INFO]  uri:classloader:/jruby/kernel/gem_prelude.rb:9:in `<top>'
[INFO]  file:/Users/cmeier/.m2/repository/org/jruby/jruby-core/9.1.0.0-SNAPSHOT/jruby-core-9.1.0.0-SNAPSHOT.jar!/jruby/preludes.rb:1:in `load'
[INFO]  file:/Users/cmeier/.m2/repository/org/jruby/jruby-core/9.1.0.0-SNAPSHOT/jruby-core-9.1.0.0-SNAPSHOT.jar!/jruby/preludes.rb:1:in `<top>'

which gets activated on jruby startup.

commit 4a8a2bc introduce this problem.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions