bundler version 2.0.1 fails to run #6882
Comments
@colby-swandale: thank you! i resolved it by deleting |
@colby-swandale I read the blog post but downgrading |
I have this weird issue when I try to build Arch Linux |
To add to what @anatol said, we also have rubygems 3.0.2 but it still doesn't seem to be able to update the Gemfile.lock to v2 of bundler:
|
|
I'm afraid not; I still get the same error message when running your command. |
Well, that seems definitely a bug. We shouldn't recommend solutions that don't work. I'll try to repro this. |
It seems to be a ruby 2.5.x problem.
For me (but I'm perhaps wrong), the blog statements are not taking care of this situation. This is strange because I get it working in an other ruby version 2.4.1 :
and 2.3.7 :
|
Just after installing the ruby 2.6.0, I get stuck to bundler 1.17.2 :
Probably an other Issue not to be adressed on this issue, but then I cannot tell you if it's doing the same thing as the 2.5 series. |
ARRRG ! Deleting Gemfile.lock did the job on that repository and my others. |
Is there any way to solve this without deleting Gemfile.lock? |
On a side note, that message is way too unclear, when it broke our staging servers we had no idea what was going on, and just automatically downgraded and started auditing our servers for problems, nowhere did bundler even indicate the problem was that it was trying to auto switch, and that the version of Bundler we were using in our Gemfile.lock was outdated. I feel like just throwing out a random error and assuming we know the internals of Bundler is a bit cheeky. |
Rather than deleting the whole
Another reasonable fix (if you're able to) is to update
|
@olliebennett Thanks, I go for
|
I just ran into this issue as well after (apparently) updating bundler to 2.x. From my understanding the error:
means Bundler 2 cannot find the version of Bundler that is specified in
Alternatively, I personally would find it perfectly reasonable that whenever the user executes Lastly it would be helpful whenever the user executes |
@bobvanderlinden Your suggestions make sense and it's a direction we want to follow in general. Just a comment for your first suggestion. I think you might be running an old version of rubygems and if you upgrade it through |
@deivid-rodriguez Thanks. That indeed helps. It now shows:
|
In our bundler 2.0.1 project, we had to fallback to 1.x because one of our dependencies. https://github.com/abonas/kubeclient/blob/master/kubeclient.gemspec#L23 I have a feeling there will be much resistance to bundler v2, adoption will be slow, and you will have much traffic in this issue soon. What are the main differences for v2 ? Are there any breaking changes ? |
@bobvanderlinden Great, glad that worked. And thanks for your suggestions! @c0ze Bundler 2 should be essentially compatible with bundler 1. However, we decided to bump the major version anyways, because we were still shipping a few minor incompatibilities and also to signal that we were dropping support for rubies that had been supported for ages. Anyways, the development dependencies of the gemspec you link to shouldn't be considered in principle, only runtime dependencies. Can you tell me more about your case, maybe with steps to reproduce? |
@bobvanderlinden @deivid-rodriguez I should have updated my comment too. Indeed the other week I noticed that message as well and was delighted it finally gave me a nice message and obliged by installing the right version. |
thanks for the info. Unfortunately I can not give you a link, but I was under the impression that any project bundled with v2 will require fallback v1 if one of the dependency gems required bundler v1 in the gemspec. However I can not reproduce this atm, so consider my message as a false warning. I will check our project again. thanks ! |
No problem @c0ze, just let me know if you manage to reproduce again. To sum up, unless there's some other issue (which could be), your dependencies should only force you to stay on bundler 1 if they specify bundler 1 as a runtime dependency. |
Download the latest metasploit framework from GitHub if you want it reproduced. You need to delete the gemfile.lock to update bundler before the app will initialize its postgresql database |
@fused2explode please provide a script to reproduce the issue if you'd like us to investigate. Thanks! |
I'm closing this. If anyone is still having issues, please open a new issue with the details of your problem. |
Deleting the "BUNDLED WITH" section in my gemfile.lock solved another problem that I've been having for more than a day, so thanks for your response @olliebennett. I'm mentioning this here in case someone else is getting the error that I was.
I'm using ruby 2.6.3p62 (2019-04-16 revision 67580) [x86_64-darwin18] and Bundler version 2.0.1 (2019-01-04 commit d7ad219). I couldn't deploy to heroku to save my life, and deleting that worked when nothing else did. |
@ohboyd I am trying to deploy my rails api and I am getting the same exact error you had. I tried removing bundled with from my gemfile.lock file but it still returns the same error. I'm just curious, did you attempt anything else? |
@reireynoso Hey I tried a TON of other things first. Are you getting the correct versions when you run all those commands that the error message above wants you to try? I had an issue with the correct versions initially and I'm using rbenv, so I had to do some stuff in Xcode preferences to get the proper version there. If that's not something you're struggling with, I also had to use |
@ohboyd Hey yeah i made a rookie mistake. I updated the versions on ruby and bundler but I wasn't committing it, so every time I pushed, it was reading the older versions. But in the end I didn't need to change the gemfile.lock. I just installed the latest version of ruby (2.6.3) and bundler (2.0.2). |
Hey folks, I just run below command and it works like a charm. No need to touch
|
Running this command fixed the issue for me |
``` 4: from /home/travis/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `<main>' 3: from /home/travis/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `eval' 2: from /home/travis/.rvm/rubies/ruby-2.6.3/bin/bundle:23:in `<main>' 1: from /home/travis/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/rubygems.rb:294:in `activate_bin_path' /home/travis/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/rubygems.rb:275:in `find_spec_for_exe': Could not find 'bundler' (1.17.3) required by your /home/travis/build/plataformatec/simple_form/Gemfile.lock. (Gem::GemNotFoundException) ``` Ref: rubygems/bundler#6882 (comment)
This commit is supposed to fix the following error on Travis: ``` 4: from /home/travis/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `<main>' 3: from /home/travis/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `eval' 2: from /home/travis/.rvm/rubies/ruby-2.6.3/bin/bundle:23:in `<main>' 1: from /home/travis/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/rubygems.rb:294:in `activate_bin_path' /home/travis/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/rubygems.rb:275:in `find_spec_for_exe': Could not find 'bundler' (1.17.3) required by your /home/travis/build/plataformatec/simple_form/Gemfile.lock. (Gem::GemNotFoundException) ``` Ref: rubygems/bundler#6882 (comment)
This commit is supposed to fix the following error on Travis: ``` 4: from /home/travis/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `<main>' 3: from /home/travis/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `eval' 2: from /home/travis/.rvm/rubies/ruby-2.6.3/bin/bundle:23:in `<main>' 1: from /home/travis/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/rubygems.rb:294:in `activate_bin_path' /home/travis/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/rubygems.rb:275:in `find_spec_for_exe': Could not find 'bundler' (1.17.3) required by your /home/travis/build/plataformatec/simple_form/Gemfile.lock. (Gem::GemNotFoundException) ``` Ref: rubygems/bundler#6882 (comment)
This commit is supposed to fix the following error on Travis: ``` 4: from /home/travis/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `<main>' 3: from /home/travis/.rvm/gems/ruby-2.6.3/bin/ruby_executable_hooks:24:in `eval' 2: from /home/travis/.rvm/rubies/ruby-2.6.3/bin/bundle:23:in `<main>' 1: from /home/travis/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/rubygems.rb:294:in `activate_bin_path' /home/travis/.rvm/rubies/ruby-2.6.3/lib/ruby/site_ruby/2.6.0/rubygems.rb:275:in `find_spec_for_exe': Could not find 'bundler' (1.17.3) required by your /home/travis/build/plataformatec/simple_form/Gemfile.lock. (Gem::GemNotFoundException) ``` Ref: rubygems/bundler#6882 (comment) Also, the CI can no longer build for jruby 9.1.17.0 due this error: ``` NoMethodError: undefined method `[]' for nil:NilClass /home/travis/.rvm/gems/jruby-9.1.17.0/gems/bundler-2.1.2/lib/bundler/source/git/git_proxy.rb:90:in `version' /home/travis/.rvm/gems/jruby-9.1.17.0/gems/bundler-2.1.2/lib/bundler/source/git/git_proxy.rb:147:in `block in copy_to' org/jruby/RubyDir.java:323:in `chdir' /home/travis/.rvm/gems/jruby-9.1.17.0/gems/bundler-2.1.2/lib/bundler/shared_helpers.rb:52:in `block in chdir' /home/travis/.rvm/rubies/jruby-9.1.17.0/lib/ruby/stdlib/monitor.rb:214:in `mon_synchronize' ``` I'm not sure what to do to fix that, maybe we could remove this from our build and keep only the last version of jruby? That's what this commit does 🙈.
it feels like there is a bug with bundler, please see blow
The text was updated successfully, but these errors were encountered: