Repository navigation
Closed
Labels
Description
Describe the problem as clearly as you can
bundle update --bundler does not change the BUNDLED WITH version in the lock file. The lock file remains unchanged.
Did you try upgrading rubygems & bundler?
Yes.
$ gem install bundler
Successfully installed bundler-2.3.3
1 gem installed
$ gem update --system
Latest version already installed. Done.
Post steps to reproduce the problem
- Start with a lock file that has
BUNDLED WITHof an older version (e.g. 2.2.3). - Install the latest version of bundler with
gem install bundler(as of this writing, 2.3.3). - Run
bundle update --bundler.
$ tail -n2 Gemfile.lock
BUNDLED WITH
2.2.3
$ gem install bundler
Successfully installed bundler-2.3.3
1 gem installed
$ bundle update --bundler
...
Bundle updated!
Which command did you run?
bundle update --bundler
What were you expecting to happen?
I am expecting the Gemfile.lock to be updated with a new BUNDLED WITH version of 2.3.3, since that is the latest version I have installed.
$ gem list -e bundler
*** LOCAL GEMS ***
bundler (2.3.3, 2.2.32, 2.2.3)
What actually happened?
The Gemfile.lock is not changed. It remains with a BUNDLED WITH version of 2.2.3.
$ tail -n2 Gemfile.lock
BUNDLED WITH
2.2.3
If not included with the output of your command, run bundle env and paste the output below
Environment
Bundler 2.2.3
Platforms ruby, x86_64-darwin-20
Ruby 3.0.3p157 (2021-11-24 revision 3fb7d2cadc18472ec107b14234933b017a33c14d) [x86_64-darwin20]
Full Path /Users/mbrictson/.rbenv/versions/3.0.3/bin/ruby
Config Dir /Users/mbrictson/.rbenv/versions/3.0.3/etc
RubyGems 3.3.3
Gem Home /Users/mbrictson/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0
Gem Path /Users/mbrictson/.gem/ruby/3.0.0:/Users/mbrictson/.rbenv/versions/3.0.3/lib/ruby/gems/3.0.0
User Home /Users/mbrictson
User Path /Users/mbrictson/.gem/ruby/3.0.0
Bin Dir /Users/mbrictson/.rbenv/versions/3.0.3/bin
Tools
Git 2.34.1
RVM not installed
rbenv rbenv 1.2.0
chruby not installed
Bundler Build Metadata
Built At 2020-12-22
Git SHA 29dc3c8398
Released Version true
Bundler settings
jobs
Set for the current user (/Users/mbrictson/.bundle/config): 16
ignore_messages.httparty
Set for the current user (/Users/mbrictson/.bundle/config): true
gem.coc
Set for the current user (/Users/mbrictson/.bundle/config): true
gem.mit
Set for the current user (/Users/mbrictson/.bundle/config): true
gem.test
Set for the current user (/Users/mbrictson/.bundle/config): "minitest"
retry
Set for the current user (/Users/mbrictson/.bundle/config): 3
github.https
Set for the current user (/Users/mbrictson/.bundle/config): "true"
build.mysql2
Set for the current user (/Users/mbrictson/.bundle/config): "--with-opt-dir=/usr/local/opt/openssl"
build.libxml._ruby
Set for the current user (/Users/mbrictson/.bundle/config): "--with-xml2-include=/usr/local/opt/libxml2/include/libxml2/"
build.nokogiri
Set for the current user (/Users/mbrictson/.bundle/config): "--use-system-libraries --with-xslt-include=/usr/local/opt/libxslt/include/libxslt --with-xslt-lib=/usr/local/opt/libxslt/lib --with-xml2-include=/usr/local/opt/libxml2/include/libxml2 --with-xml2-lib=/usr/local/opt/libxml2/lib"
gem.ci
Set for the current user (/Users/mbrictson/.bundle/config): "travis"
gem.rubocop
Set for the current user (/Users/mbrictson/.bundle/config): "true"
Gemfile
Gemfile
source "https://rubygems.org"
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
gem "friendly_id"
gem "pg"
gem "pgcli-rails"
gem "puma"
gem "pygments.rb"
gem "rack-canonical-host"
gem "rails"
gem "redcarpet"
gem "secure_headers"
gem "sentry-rails"
gem "sentry-ruby"
gem "sitemap_generator"
gem "turbolinks"
gem "typogruby"
gem "webpacker"
group :development do
gem "amazing_print"
gem "annotate", github: "dabit/annotate_models", branch: "rails-7"
gem "better_errors"
gem "binding_of_caller"
gem "rb-fsevent", require: false
end
group :development, :test do
gem "brakeman", require: false
gem "bundler-audit", require: false
gem "launchy"
gem "rubocop"
gem "rubocop-minitest"
gem "rubocop-performance"
gem "rubocop-rails"
gem "tomo", github: "mattbrictson/tomo", branch: "main"
end
group :test do
gem "capybara"
gem "minitest-ci", require: false
gem "selenium-webdriver"
gem "webdrivers"
endGemfile.lock
GIT
remote: https://github.com/dabit/annotate_models.git
revision: f38741d005052045e4d4c2c26b009d3ade0864f3
branch: rails-7
specs:
annotate (3.1.1)
activerecord (>= 3.2, < 7.1)
rake (>= 10.4, < 14.0)
GIT
remote: https://github.com/mattbrictson/tomo.git
revision: 237c1ff115fd30db69003906db1bbdc972c3a045
branch: main
specs:
tomo (1.10.0)
GEM
remote: https://rubygems.org/
specs:
actioncable (7.0.0)
actionpack (= 7.0.0)
activesupport (= 7.0.0)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (7.0.0)
actionpack (= 7.0.0)
activejob (= 7.0.0)
activerecord (= 7.0.0)
activestorage (= 7.0.0)
activesupport (= 7.0.0)
mail (>= 2.7.1)
actionmailer (7.0.0)
actionpack (= 7.0.0)
actionview (= 7.0.0)
activejob (= 7.0.0)
activesupport (= 7.0.0)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (7.0.0)
actionview (= 7.0.0)
activesupport (= 7.0.0)
rack (~> 2.0, >= 2.2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (7.0.0)
actionpack (= 7.0.0)
activerecord (= 7.0.0)
activestorage (= 7.0.0)
activesupport (= 7.0.0)
globalid (>= 0.6.0)
nokogiri (>= 1.8.5)
actionview (7.0.0)
activesupport (= 7.0.0)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (7.0.0)
activesupport (= 7.0.0)
globalid (>= 0.3.6)
activemodel (7.0.0)
activesupport (= 7.0.0)
activerecord (7.0.0)
activemodel (= 7.0.0)
activesupport (= 7.0.0)
activestorage (7.0.0)
actionpack (= 7.0.0)
activejob (= 7.0.0)
activerecord (= 7.0.0)
activesupport (= 7.0.0)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (7.0.0)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
addressable (2.8.0)
public_suffix (>= 2.0.2, < 5.0)
amazing_print (1.4.0)
ast (2.4.2)
better_errors (2.9.1)
coderay (>= 1.0.0)
erubi (>= 1.0.0)
rack (>= 0.9.0)
binding_of_caller (1.0.0)
debug_inspector (>= 0.0.1)
brakeman (5.2.0)
builder (3.2.4)
bundler-audit (0.9.0.1)
bundler (>= 1.2.0, < 3)
thor (~> 1.0)
capybara (3.36.0)
addressable
matrix
mini_mime (>= 0.1.3)
nokogiri (~> 1.8)
rack (>= 1.6.0)
rack-test (>= 0.6.3)
regexp_parser (>= 1.5, < 3.0)
xpath (~> 3.2)
childprocess (4.1.0)
coderay (1.1.3)
concurrent-ruby (1.1.9)
crass (1.0.6)
debug_inspector (1.1.0)
erubi (1.10.0)
faraday (1.8.0)
faraday-em_http (~> 1.0)
faraday-em_synchrony (~> 1.0)
faraday-excon (~> 1.1)
faraday-httpclient (~> 1.0.1)
faraday-net_http (~> 1.0)
faraday-net_http_persistent (~> 1.1)
faraday-patron (~> 1.0)
faraday-rack (~> 1.0)
multipart-post (>= 1.2, < 3)
ruby2_keywords (>= 0.0.4)
faraday-em_http (1.0.0)
faraday-em_synchrony (1.0.0)
faraday-excon (1.1.0)
faraday-httpclient (1.0.1)
faraday-net_http (1.0.1)
faraday-net_http_persistent (1.2.0)
faraday-patron (1.0.0)
faraday-rack (1.0.0)
friendly_id (5.4.2)
activerecord (>= 4.0.0)
globalid (1.0.0)
activesupport (>= 5.0)
i18n (1.8.11)
concurrent-ruby (~> 1.0)
launchy (2.5.0)
addressable (~> 2.7)
loofah (2.13.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (1.0.2)
matrix (0.4.2)
method_source (1.0.0)
mini_mime (1.1.2)
mini_portile2 (2.6.1)
minitest (5.15.0)
minitest-ci (3.4.0)
minitest (>= 5.0.6)
multipart-post (2.1.1)
nio4r (2.5.8)
nokogiri (1.12.5)
mini_portile2 (~> 2.6.1)
racc (~> 1.4)
parallel (1.21.0)
parser (3.0.3.2)
ast (~> 2.4.1)
pg (1.2.3)
pgcli-rails (0.6.1)
railties (>= 4.2.0)
public_suffix (4.0.6)
puma (5.5.2)
nio4r (~> 2.0)
pygments.rb (2.2.0)
racc (1.6.0)
rack (2.2.3)
rack-canonical-host (1.1.0)
addressable (> 0, < 3)
rack (>= 1.0.0, < 3)
rack-proxy (0.7.0)
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (7.0.0)
actioncable (= 7.0.0)
actionmailbox (= 7.0.0)
actionmailer (= 7.0.0)
actionpack (= 7.0.0)
actiontext (= 7.0.0)
actionview (= 7.0.0)
activejob (= 7.0.0)
activemodel (= 7.0.0)
activerecord (= 7.0.0)
activestorage (= 7.0.0)
activesupport (= 7.0.0)
bundler (>= 1.15.0)
railties (= 7.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.4.2)
loofah (~> 2.3)
railties (7.0.0)
actionpack (= 7.0.0)
activesupport (= 7.0.0)
method_source
rake (>= 12.2)
thor (~> 1.0)
zeitwerk (~> 2.5)
rainbow (3.0.0)
rake (13.0.6)
rb-fsevent (0.11.0)
redcarpet (3.5.1)
regexp_parser (2.2.0)
rexml (3.2.5)
rubocop (1.24.0)
parallel (~> 1.10)
parser (>= 3.0.0.0)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 1.8, < 3.0)
rexml
rubocop-ast (>= 1.15.0, < 2.0)
ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 3.0)
rubocop-ast (1.15.0)
parser (>= 3.0.1.1)
rubocop-minitest (0.17.0)
rubocop (>= 0.90, < 2.0)
rubocop-performance (1.12.0)
rubocop (>= 1.7.0, < 2.0)
rubocop-ast (>= 0.4.0)
rubocop-rails (2.12.4)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.7.0, < 2.0)
ruby-progressbar (1.11.0)
ruby2_keywords (0.0.5)
rubypants (0.7.1)
rubyzip (2.3.2)
secure_headers (6.3.3)
selenium-webdriver (4.1.0)
childprocess (>= 0.5, < 5.0)
rexml (~> 3.2, >= 3.2.5)
rubyzip (>= 1.2.2)
semantic_range (3.0.0)
sentry-rails (4.8.1)
railties (>= 5.0)
sentry-ruby-core (~> 4.8.1)
sentry-ruby (4.8.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
faraday (>= 1.0)
sentry-ruby-core (= 4.8.1)
sentry-ruby-core (4.8.1)
concurrent-ruby
faraday
sitemap_generator (6.1.2)
builder (~> 3.0)
thor (1.1.0)
turbolinks (5.2.1)
turbolinks-source (~> 5.2)
turbolinks-source (5.2.0)
typogruby (1.0.18)
rubypants
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
unicode-display_width (2.1.0)
webdrivers (5.0.0)
nokogiri (~> 1.6)
rubyzip (>= 1.3.0)
selenium-webdriver (~> 4.0)
webpacker (5.4.3)
activesupport (>= 5.2)
rack-proxy (>= 0.6.1)
railties (>= 5.2)
semantic_range (>= 2.3.0)
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
xpath (3.2.0)
nokogiri (~> 1.8)
zeitwerk (2.5.1)
PLATFORMS
ruby
DEPENDENCIES
amazing_print
annotate!
better_errors
binding_of_caller
brakeman
bundler-audit
capybara
friendly_id
launchy
minitest-ci
pg
pgcli-rails
puma
pygments.rb
rack-canonical-host
rails
rb-fsevent
redcarpet
rubocop
rubocop-minitest
rubocop-performance
rubocop-rails
secure_headers
selenium-webdriver
sentry-rails
sentry-ruby
sitemap_generator
tomo!
turbolinks
typogruby
webdrivers
webpacker
BUNDLED WITH
2.2.3
Activity
mattbrictson commentedon Dec 26, 2021
Interesting... If I explicitly specify the bundler version using
_VERSION_argument,bundle update --bundlerworks as expected.indirect commentedon Dec 26, 2021
@deivid-rodriguez oh no, does the automatic version switcher work so well that the locked version of Bundler updates to... itself? 😂
deivid-rodriguez commentedon Dec 26, 2021
I just noticed this issue myself too yesterday. I have a fix in progress, I'll open a PR soon and try to include it with the next version together with #5182 and #5205.
The problem is more or less what @indirect says, yeah 😅. There's really no code in Bundler to handle the
bundle update --bundlercase. The only thing that made it work before is that rubygems won't auto switch to the locked version if we are running thebundle update --bundlercommand:https://github.com/rubygems/rubygems/blob/4536e0a0ea21a87c05f3386213be3dfb24eed03d/lib/rubygems/bundler_version_finder.rb#L4-L14
That means that the latest version is run in that case, so bundler automatically updates the lockfile after it's done with that version.
Now that we added further auto switching and auto installing to bundler itself, I forgot to consider this case, so bundler is indeed switching to the locked version and no update of the lockfile is of course happening.
I did consider other cases like
BUNDLER_VERSIONorbundle _<version>_, that's why they still work.deivid-rodriguez commentedon Dec 27, 2021
#5224 should fix this!