-
-
Notifications
You must be signed in to change notification settings - Fork 2k
Bundler 1.16.3 results in load error #6629
Comments
I have a feeling that this may be the same issue as #6537. I suggest fixing your version of Bundler to 1.16.2 for the time being |
Yes, that does help indeed. It also only occurs in that nested bundle context, the other jobs are working fine. |
Hey everybody. I think the Vox Pupuli org (https://travis-ci.org/voxpupuli/puppet-archive) got his by this as well. We see this error on ruby2.1.9, 2.4.4 and 2.5.1 under certain constraints that I did not yet discovered. |
Same problem for me with ruby 2.5.1 (on Travis). |
See: rubygems/bundler#6629 Should be changed when fixed on next bundler release
…der 2.2 (#2013) Puma now requires Ruby 2.2 minimum See: https://github.com/puma/puma/pull/1506/files Also specify bundler version because of: rubygems/bundler#6629 Specific version should be removed when the issue is fixed on next release of bundler.
Upstream ticket: rubygems/bundler#6629 $ bundle exec rake test bundle exec jekyll build --trace --drafts ----- Build site ----- /usr/local/bundle/bin/bundle:23:in `load': cannot load such file -- /usr/local/lib/ruby/gems/2.5.0/gems/bundler-1.16.3/exe/bundle (LoadError) from /usr/local/bundle/bin/bundle:23:in `<main>' rake aborted! Command failed with status (1): [bundle exec jekyll build --trace --drafts...] /builds/project-0/Rakefile:14:in `block in <top (required)>' /cache/bundler/ruby/2.5.0/gems/rake-12.3.1/exe/rake:27:in `<top (required)>' /usr/local/bundle/gems/bundler-1.16.3/lib/bundler/cli/exec.rb:74:in `load' /usr/local/bundle/gems/bundler-1.16.3/lib/bundler/cli/exec.rb:74:in `kernel_load' /usr/local/bundle/gems/bundler-1.16.3/lib/bundler/cli/exec.rb:28:in `run' /usr/local/bundle/gems/bundler-1.16.3/lib/bundler/cli.rb:424:in `exec' /usr/local/bundle/gems/bundler-1.16.3/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run' /usr/local/bundle/gems/bundler-1.16.3/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command' /usr/local/bundle/gems/bundler-1.16.3/lib/bundler/vendor/thor/lib/thor.rb:387:in `dispatch' /usr/local/bundle/gems/bundler-1.16.3/lib/bundler/cli.rb:27:in `dispatch' /usr/local/bundle/gems/bundler-1.16.3/lib/bundler/vendor/thor/lib/thor/base.rb:466:in `start' /usr/local/bundle/gems/bundler-1.16.3/lib/bundler/cli.rb:18:in `start' /usr/local/bundle/gems/bundler-1.16.3/exe/bundle:30:in `block in <top (required)>' /usr/local/bundle/gems/bundler-1.16.3/lib/bundler/friendly_errors.rb:124:in `with_friendly_errors' /usr/local/bundle/gems/bundler-1.16.3/exe/bundle:22:in `<top (required)>' /usr/local/bundle/bin/bundle:23:in `load' /usr/local/bundle/bin/bundle:23:in `<main>'
I'm not sure if I'm supposed to +1 on github but I've encountered this issue
I'm not sure why it's even trying to load the file from that location,
Reverting to |
It seems rubygems/bundler#6629 may be breaking the builds, locking to 1.16.2 for now.
I am having this issue on RubyGems 2.7.7 and bundler 1.16.3. I initially reported to Rubygems, but I think the issue is in bundler. |
1.16.3 (and apparently 1.16.4 - the latest) seem to be suffering rubygems/bundler#6629
1.16.3 (and apparently 1.16.4 - the latest) seem to be suffering rubygems/bundler#6629
I am still getting the same error on new bundler |
Yes, this problem will continue to exist in new releases of Bundler until we can fix this issue. |
…wandale Fix loadError occurring in nested bundle exec calls ### What was the end-user problem that led to this PR? There is a LoadError occurring in Bundler when an application has its Gemfile installed with `--path`, and the user has a recent version of RubyGems that installs a version of Bundler as a default gem. If the user has some code that they're running with `bundle exec` (like a test suite) that is shelling out and executing `bundle exec` again, the user will receive an error saying that Bundler could not be loaded. /home/travis/.rvm/gems/ruby-2.5.1/bin/bundle:23:in `load': cannot load such file -- /home/travis/.rvm/rubies/ruby-2.5.1/lib/ruby/gems/2.5.0/gems/bundler-1.16.3/exe/bundle (LoadError) The problem that's happening is that when we run `bundle exec`, Bundler will set the Ruby environment to add the path of the current version of Bundler into the `LOAD_PATH` and also require `bundler/setup`. RUBYOPT=-rbundler/setup RUBYLIB=/usr/local/bundle/gems/bundler-1.16.4/lib This will have Ruby load the lib directory of the version of Bundler the user installed, but it's been loaded with the Gemspec from the default gem version of Bundler that RubyGems installed. This gemspec is being loaded because RubyGems has a copy of the Bundler gemspec sitting in the default gems. And because we changed `GEM_HOME` when the user ran Bundler with `bundle install --path`, RubyGems just figures that seeing this is only Bundler gemspec it can find, then it should activate it but then `RUBYLIB` comes into play and just overrules RubyGems to load the newer Bundler src. This is ultimately what's giving us the weird load path that doesn't exist.  ### What was your diagnosis of the problem? See #6537 and #6629 ### What is your fix for the problem, implemented in this PR? When we set the `BUNDLE_BIN_PATH` env var inside bundler, check that the file exists. If it doesn't, we will just set it to the bundle executable file. ### Why did you choose this fix out of the possible options? This seems to be the solution that patches the LoadError issue without having to heavily refactor code or make the existing code more complicated.
…wandale Fix loadError occurring in nested bundle exec calls ### What was the end-user problem that led to this PR? There is a LoadError occurring in Bundler when an application has its Gemfile installed with `--path`, and the user has a recent version of RubyGems that installs a version of Bundler as a default gem. If the user has some code that they're running with `bundle exec` (like a test suite) that is shelling out and executing `bundle exec` again, the user will receive an error saying that Bundler could not be loaded. /home/travis/.rvm/gems/ruby-2.5.1/bin/bundle:23:in `load': cannot load such file -- /home/travis/.rvm/rubies/ruby-2.5.1/lib/ruby/gems/2.5.0/gems/bundler-1.16.3/exe/bundle (LoadError) The problem that's happening is that when we run `bundle exec`, Bundler will set the Ruby environment to add the path of the current version of Bundler into the `LOAD_PATH` and also require `bundler/setup`. RUBYOPT=-rbundler/setup RUBYLIB=/usr/local/bundle/gems/bundler-1.16.4/lib This will have Ruby load the lib directory of the version of Bundler the user installed, but it's been loaded with the Gemspec from the default gem version of Bundler that RubyGems installed. This gemspec is being loaded because RubyGems has a copy of the Bundler gemspec sitting in the default gems. And because we changed `GEM_HOME` when the user ran Bundler with `bundle install --path`, RubyGems just figures that seeing this is only Bundler gemspec it can find, then it should activate it but then `RUBYLIB` comes into play and just overrules RubyGems to load the newer Bundler src. This is ultimately what's giving us the weird load path that doesn't exist.  ### What was your diagnosis of the problem? See #6537 and #6629 ### What is your fix for the problem, implemented in this PR? When we set the `BUNDLE_BIN_PATH` env var inside bundler, check that the file exists. If it doesn't, we will just set it to the bundle executable file. ### Why did you choose this fix out of the possible options? This seems to be the solution that patches the LoadError issue without having to heavily refactor code or make the existing code more complicated. (cherry picked from commit 8c31a61)
…wandale Fix loadError occurring in nested bundle exec calls ### What was the end-user problem that led to this PR? There is a LoadError occurring in Bundler when an application has its Gemfile installed with `--path`, and the user has a recent version of RubyGems that installs a version of Bundler as a default gem. If the user has some code that they're running with `bundle exec` (like a test suite) that is shelling out and executing `bundle exec` again, the user will receive an error saying that Bundler could not be loaded. /home/travis/.rvm/gems/ruby-2.5.1/bin/bundle:23:in `load': cannot load such file -- /home/travis/.rvm/rubies/ruby-2.5.1/lib/ruby/gems/2.5.0/gems/bundler-1.16.3/exe/bundle (LoadError) The problem that's happening is that when we run `bundle exec`, Bundler will set the Ruby environment to add the path of the current version of Bundler into the `LOAD_PATH` and also require `bundler/setup`. RUBYOPT=-rbundler/setup RUBYLIB=/usr/local/bundle/gems/bundler-1.16.4/lib This will have Ruby load the lib directory of the version of Bundler the user installed, but it's been loaded with the Gemspec from the default gem version of Bundler that RubyGems installed. This gemspec is being loaded because RubyGems has a copy of the Bundler gemspec sitting in the default gems. And because we changed `GEM_HOME` when the user ran Bundler with `bundle install --path`, RubyGems just figures that seeing this is only Bundler gemspec it can find, then it should activate it but then `RUBYLIB` comes into play and just overrules RubyGems to load the newer Bundler src. This is ultimately what's giving us the weird load path that doesn't exist.  ### What was your diagnosis of the problem? See #6537 and #6629 ### What is your fix for the problem, implemented in this PR? When we set the `BUNDLE_BIN_PATH` env var inside bundler, check that the file exists. If it doesn't, we will just set it to the bundle executable file. ### Why did you choose this fix out of the possible options? This seems to be the solution that patches the LoadError issue without having to heavily refactor code or make the existing code more complicated. (cherry picked from commit 8c31a61)
This issue has been fixed in the newest release of Bundler. |
On bundle 1.16.3 we start seeing fail builds: - rspec#2013 (comment) This is related to: - rspec#2013 (comment) As mentionned this has been fixed in 1.16.4: - rubygems/bundler#6629 (comment)
On bundle 1.16.3 we start seeing fail builds: - rspec#2013 (comment) This is related to: - rspec#2013 (comment) As mentionned this has been fixed in 1.16.4: - rubygems/bundler#6629 (comment)
rubygems/bundler#6629 has been fixed
On bundle 1.16.3 we start seeing fail builds: - rspec#2013 (comment) This is related to: - rspec#2013 (comment) As mentionned this has been fixed in 1.16.4: - rubygems/bundler#6629 (comment)
Upstream ticket (rubygems/bundler#6629) has been resolved.
See: rubygems/bundler#6629 Should be changed when fixed on next bundler release
Our travis environment started failing this morning after the release of 1.16.3. It is connected to
parallel_test
trying to execute in a bundle context despite bundler already loaded.This PR rolling back to 1.16.2 results in correct execution:
https://travis-ci.org/opf/openproject/jobs/404795702 (Change behind that is opf/openproject#6432).
vs. it breaking with 1.16.3
https://travis-ci.org/opf/openproject/jobs/404746397
Please let me know if and how I can provide further insight in that failure from our side. Is it a regression? has a change in 1.16.3 affected something? shouldn't this have worked in the first place?
The text was updated successfully, but these errors were encountered: