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

Bundler 2 trying to match minor version instead of major version #2576

Closed
schneems opened this issue Jan 4, 2019 · 4 comments
Closed

Bundler 2 trying to match minor version instead of major version #2576

schneems opened this issue Jan 4, 2019 · 4 comments

Comments

@schneems
Copy link
Contributor

schneems commented Jan 4, 2019

Based on the discussion in #2515 bundler 2.x should look for a compatible major version of bundler (as seen in the Gemfile.lock file). However, it fails for me when it cannot find the exact minor version. Here's what it looks like on my machine:

$ cd /tmp
$ mkdir bundle_exact_version_bug
$ cd bundle_exact_version_bug/
$ touch Gemfile
$ gem install bundler -v 2.0.1 --no-document
$ bundle
$ gem uninstall bundler -v 2.0.1
$ bundle -v
Traceback (most recent call last):
  2: from /Users/rschneeman/.gem/ruby/2.6.0/bin/bundle:23:in `<main>'
  1: from /Users/rschneeman/.rubies/ruby-2.6.0/lib/ruby/2.6.0/rubygems.rb:302:in `activate_bin_path'
/Users/rschneeman/.rubies/ruby-2.6.0/lib/ruby/2.6.0/rubygems.rb:283:in `find_spec_for_exe': Could not find 'bundler' (2.0.1) required by your /private/tmp/bundle_exact_version_bug/Gemfile.lock. (Gem::GemNotFoundException)
To update to the latest version installed on your system, run `bundle update --bundler`.
To install the missing version, run `gem install bundler:2.0.1`

Environment:

$ gem env version
3.0.1
$ ruby -v
ruby 2.6.0p0 (2018-12-25 revision 66547) [x86_64-darwin17]

I will abide by the code of conduct.

@deivid-rodriguez
Copy link
Member

@schneems I can't reproduce... https://asciinema.org/a/q8DdWqQERbAbU0Uz7yeSsPVkS. Maybe you're using bundler 1.x?

@colby-swandale
Copy link
Member

colby-swandale commented Jan 7, 2019

This seems to be working as expected? You've installed Bundler 2, ran bundle install and then uninstalled it. Which i guess then leaves just leaves Bundler 1 left?

Can provide more information about what you're expecting?

@hsbt
Copy link
Member

hsbt commented Jan 7, 2019

ref. rubygems/bundler#6882

@schneems
Copy link
Contributor Author

schneems commented Jan 8, 2019

I'm also unable to reproduce my own issue. Going to close unless someone else runs into this and can give some more details. Sorry for the false alarm, thanks for the triage!

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