-
-
Notifications
You must be signed in to change notification settings - Fork 925
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
rake fails to activate properly under bundle exec #3888
Comments
@meghalidhoble Can you provide info on how we can reproduce this? Environment (OS, JRuby version, etc) and step-by-step instructions please :-) |
Yes sure, @headius! Steps:
NOTE: I found that the multiple versions of rake were giving problem so tried removing the default one failed. Thanks, |
Hmm...I was unable to reproduce either inside or outside rvm:
There must be something different about your environment. Can you see anything in ENV that might be affecting its ability to locate gems? |
No love with bundle exec either :-( (This is under rvm JRuby 9.0.5.0)
|
Ah-ha...I did not let it run long enough. It did error after the download. So it seems the problem is similar to the other cases, where a re-launch of JRuby is not able to find libraries that are obviously installed. I will investigate today. |
Alright @headius, thanks! |
Taking notes as I go...seems that it's the And only under bundler.
@mkristian This isn't in an embedded scenario, but is it the same bundler issue again? |
Ok, at least part of the problem here seems to be that bundler is adjusting |
Here's what I've been able to figure out. With the instructions you provide, JRuby 9k does indeed fail. It appears to be a relaunch of JRuby that can't find gems. Investigating the error itself, I found that at that point the env var On a hunch I switched your build to vendoring JRuby 9.1 and did a
The rake tasks that failed before now proceed correctly! And then something different fails inside Logstash's bundler patches! Patches, you say? I discovered a number of patches and tweaks to Bundler in your At this point I'm a bit out of my depth and I don't know how to proceed. I'm not sure what all logstash is patching, or why, or what impact and interaction that has with JRuby 9.1, Ruby 2.3 stdlib, and RubyGems. Is there someone at Elastic that's familiar with all this unusual build-munging you're doing? I think we need you folks to do a bit more probing into these patches to make sure they're not part of the problem. |
@headius, yeah I've been battling this issue as well. Will report back when I have a proper solution. |
The issue outlined by @headius, seems to be caused by the |
@emmanuellyautomated I don't know what the USE_RUBY=1 does, but it sounds like it may be scrubbing out some env we need to properly relaunch. |
So when using the system version of jruby, I saw that the NOTE: by doing this, things worked with or without the |
@headius, @emmanuellyautomated I am looking into this as part of the official push to move Logstash from 1.7.25 to 9.1.6.0 |
Found the problem in Logstash. This issue can be closed. the fault is in logstash/lib/bootstrap/bundler.rb:89 ::Gem.paths = ENV['GEM_HOME'] = ENV['GEM_PATH'] = LogStash::Environment.logstash_gem_home This sends a string to In 9K the In Logstash this can be fixed with: ENV['GEM_HOME'] = ENV['GEM_PATH'] = LogStash::Environment.logstash_gem_home
::Gem.paths = ENV |
PS. We do a lot of bundler and rubygems patching to support a fully vendored turnkey jruby application deployable to machines without internet access. |
@guyboertje thanks for the update. |
Forked from #3852 by @meghalidhoble.
From comment #3852 (comment)
This only appears to affect JRuby 9k and probably relates to #3850 and #3867.
The text was updated successfully, but these errors were encountered: