Describe the problem as clearly as you can
If you have done bundle install with Bundler 2.3.3 on a lockfile with BUNDLED WITH set to 2.2.33, bundle update --bundler wont update the Bundler version unless you uninstall Bundler 2.2.33.
Post steps to reproduce the problem
$ echo 3.0.3 > .ruby-version
$ ruby -v
ruby 3.0.3p157 (2021-11-24 revision 3fb7d2cadc) [x86_64-darwin19]
$ gem list bundler
*** LOCAL GEMS ***
bundler (default: 2.2.33)
$ bundler -v
Bundler version 2.2.33
$ bundle init
Writing new Gemfile to /Users/dentarg/test/Gemfile
$ echo 'gem "dyno_metadata"' >> Gemfile
$ bundle
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Using bundler 2.2.33
Using dyno_metadata 0.0.3
Bundle complete! 1 Gemfile dependency, 2 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
$ cat Gemfile.lock
GEM
remote: https://rubygems.org/
specs:
dyno_metadata (0.0.3)
PLATFORMS
x86_64-darwin-19
DEPENDENCIES
dyno_metadata
BUNDLED WITH
2.2.33
$ echo 3.1.0 > .ruby-version
$ bundle
Bundler 2.3.3 is running, but your lockfile was generated with 2.2.33. Installing Bundler 2.2.33 and restarting using that version.
Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.
Using bundler 2.2.33
Using dyno_metadata 0.0.3
Bundle complete! 1 Gemfile dependency, 2 gems now installed.
Use `bundle info [gemname]` to see where a bundled gem is installed.
$ cat Gemfile.lock
GEM
remote: https://rubygems.org/
specs:
dyno_metadata (0.0.3)
PLATFORMS
x86_64-darwin-19
DEPENDENCIES
dyno_metadata
BUNDLED WITH
2.2.33
$ bundle update --bundler
Calling `DidYouMean::SPELL_CHECKERS.merge!(error_name => spell_checker)' has been deprecated. Please call `DidYouMean.correct_error(error_name, spell_checker)' instead.
Using bundler 2.2.33
Using dyno_metadata 0.0.3
Bundle updated!
$ grep -A1 'BUNDLED WITH' Gemfile.lock
BUNDLED WITH
2.2.33
$ gem uninstall bundler -v 2.2.33
Successfully uninstalled bundler-2.2.33
$ bundle update --bundler
Using bundler 2.3.3
Using dyno_metadata 0.0.3
Bundle updated!
$ grep -A1 'BUNDLED WITH' Gemfile.lock
BUNDLED WITH
2.3.3
What were you expecting to happen?
Be able to update the Bundler version in the lockfile without uninstalling older Bundler version.
What actually happened?
Bundler version in lockfile wasn't updated.
Describe the problem as clearly as you can
If you have done
bundle installwith Bundler 2.3.3 on a lockfile withBUNDLED WITHset to 2.2.33,bundle update --bundlerwont update the Bundler version unless you uninstall Bundler 2.2.33.Post steps to reproduce the problem
What were you expecting to happen?
Be able to update the Bundler version in the lockfile without uninstalling older Bundler version.
What actually happened?
Bundler version in lockfile wasn't updated.