<feed xmlns='http://www.w3.org/2005/Atom'>
<title>ruby.git/lib/rubygems/bundler_version_finder.rb, branch master</title>
<subtitle>The Ruby Programming Language</subtitle>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/'/>
<entry>
<title>[ruby/rubygems] Fall back to lockfile version when BUNDLE_VERSION is "lockfile"</title>
<updated>2026-05-14T01:27:13+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2026-05-14T00:58:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3219369142c57ded763d9326081751ef7c4bde9e'/>
<id>3219369142c57ded763d9326081751ef7c4bde9e</id>
<content type='text'>
Bundler treats "lockfile" as a special value for the version setting,
meaning "use the version recorded in BUNDLED WITH". BundlerVersionFinder
was passing the raw string to Gem::Version.new and raising ArgumentError
both from the env var added in #9538 and from .bundle/config.

https://github.com/ruby/rubygems/commit/6576bb8e53
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Bundler treats "lockfile" as a special value for the version setting,
meaning "use the version recorded in BUNDLED WITH". BundlerVersionFinder
was passing the raw string to Gem::Version.new and raising ArgumentError
both from the env var added in #9538 and from .bundle/config.

https://github.com/ruby/rubygems/commit/6576bb8e53
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/rubygems] Read BUNDLE_VERSION env var in BundlerVersionFinder</title>
<updated>2026-05-14T00:51:42+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2026-05-12T06:51:25+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=b28949c4df755caa0be23a22d7853bd1b6b5dd66'/>
<id>b28949c4df755caa0be23a22d7853bd1b6b5dd66</id>
<content type='text'>
Bundler::Settings resolves the `version` setting from the BUNDLE_VERSION
environment variable, but Gem::BundlerVersionFinder only consulted the
.bundle/config file. As a result `BUNDLE_VERSION=system` was ignored at
activation time and a lockfile-pinned bundler installed globally won
out over the default gem.

https://github.com/ruby/rubygems/issues/9534

https://github.com/ruby/rubygems/commit/c652c233aa
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Bundler::Settings resolves the `version` setting from the BUNDLE_VERSION
environment variable, but Gem::BundlerVersionFinder only consulted the
.bundle/config file. As a result `BUNDLE_VERSION=system` was ignored at
activation time and a lockfile-pinned bundler installed globally won
out over the default gem.

https://github.com/ruby/rubygems/issues/9534

https://github.com/ruby/rubygems/commit/c652c233aa
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/rubygems] Fix Bundler that re-exec $0 when a `version` is present in the config:</title>
<updated>2026-01-26T08:48:22+00:00</updated>
<author>
<name>Edouard CHIN</name>
<email>chin.edouard@gmail.com</email>
</author>
<published>2026-01-15T16:09:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ace5b10de44acc7ce7717d4109beaeba9a130700'/>
<id>ace5b10de44acc7ce7717d4109beaeba9a130700</id>
<content type='text'>
- ### Problem

  If you have a `version` in your config file (this feature was
  introduced in #6817), then running any `bundle` command will
  make Bundler re-exec and ultimately run the `bundle` binstub twice.

  ### Details

  When the `bundle` binstub gets executed, a `require "bundler"` is
  evaluated. RubyGems tries to require the `bundler.rb` file from
  the right `bundler` gem (in the event where you have multiple
  bundler versions in your system).
  RubyGems will prioritize a bundler version based on a few
  heurisitics.

  https://github.com/ruby/rubygems/blob/b50c40c92abb00bb172f1579356cc73c242b1849/lib/rubygems/bundler_version_finder.rb#L19-L21

  This prioritize logic doesn't take into account the bundler version
  a user has specific in this config. So what happens is:

  1. User execute the `bundle` binstub
  2. `require 'bundler'` is evaluated.
  3. RubyGems prioritize activating the bundler version specified
     in the Gemfile.lock
  4. The CLI starts, and [Auto switch kicks in](https://github.com/ruby/rubygems/blob/b50c40c92abb00bb172f1579356cc73c242b1849/bundler/lib/bundler/cli.rb#L81). Bundler detects that
     user specifed a version in its config and the current Bundler
     version doesn't match.
  5. Bundler exit and re-exec with the right bundler version.

  ### Solution

  This patch introduce two fixes. First, it reads the bundler config
  file and check for the local config first and then the global
  config. This is because the local has precedence over global.

  Second, the prioritization takes into account the version in config
  and let RubyGems activate the right version in order to prevent
  re-exec moments later.

  Finally, I also want to fix this problem because its a step toward
  fixing https://github.com/ruby/rubygems/issues/8106. I'll open
  a follow up patch to explain.

https://github.com/ruby/rubygems/commit/d6e0f43133
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- ### Problem

  If you have a `version` in your config file (this feature was
  introduced in #6817), then running any `bundle` command will
  make Bundler re-exec and ultimately run the `bundle` binstub twice.

  ### Details

  When the `bundle` binstub gets executed, a `require "bundler"` is
  evaluated. RubyGems tries to require the `bundler.rb` file from
  the right `bundler` gem (in the event where you have multiple
  bundler versions in your system).
  RubyGems will prioritize a bundler version based on a few
  heurisitics.

  https://github.com/ruby/rubygems/blob/b50c40c92abb00bb172f1579356cc73c242b1849/lib/rubygems/bundler_version_finder.rb#L19-L21

  This prioritize logic doesn't take into account the bundler version
  a user has specific in this config. So what happens is:

  1. User execute the `bundle` binstub
  2. `require 'bundler'` is evaluated.
  3. RubyGems prioritize activating the bundler version specified
     in the Gemfile.lock
  4. The CLI starts, and [Auto switch kicks in](https://github.com/ruby/rubygems/blob/b50c40c92abb00bb172f1579356cc73c242b1849/bundler/lib/bundler/cli.rb#L81). Bundler detects that
     user specifed a version in its config and the current Bundler
     version doesn't match.
  5. Bundler exit and re-exec with the right bundler version.

  ### Solution

  This patch introduce two fixes. First, it reads the bundler config
  file and check for the local config first and then the global
  config. This is because the local has precedence over global.

  Second, the prioritization takes into account the version in config
  and let RubyGems activate the right version in order to prevent
  re-exec moments later.

  Finally, I also want to fix this problem because its a step toward
  fixing https://github.com/ruby/rubygems/issues/8106. I'll open
  a follow up patch to explain.

https://github.com/ruby/rubygems/commit/d6e0f43133
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/rubygems] Respect `BUNDLE_VERSION` config at Gem::BundlerVersionFinder</title>
<updated>2025-11-21T04:20:05+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2025-11-21T02:22:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=ee002a5ee061e82da639e499a36810a747998747'/>
<id>ee002a5ee061e82da639e499a36810a747998747</id>
<content type='text'>
If we use "system" variable in BUNDLE_VERSION on Bundler configuration,
we can use bundler version provided by system installation.

But the current logic returns the first activated version of bundler
like 2.7.2. It makes to confuse users.

https://github.com/ruby/rubygems/commit/4eb66d9549
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If we use "system" variable in BUNDLE_VERSION on Bundler configuration,
we can use bundler version provided by system installation.

But the current logic returns the first activated version of bundler
like 2.7.2. It makes to confuse users.

https://github.com/ruby/rubygems/commit/4eb66d9549
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/rubygems] Add support for BUNDLE_LOCKFILE environment variable</title>
<updated>2025-11-20T23:01:03+00:00</updated>
<author>
<name>Jeremy Evans</name>
<email>code@jeremyevans.net</email>
</author>
<published>2025-11-11T02:23:58+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=010b23a7cfc4a20371d74406f9f0563331a233fd'/>
<id>010b23a7cfc4a20371d74406f9f0563331a233fd</id>
<content type='text'>
This specifies the lockfile location. This allows for easy support
of different lockfiles per Ruby version or platform.

https://github.com/ruby/rubygems/commit/b54d65bc0a

Co-authored-by: Sutou Kouhei &lt;kou@cozmixng.org&gt;
Co-authored-by: Colby Swandale &lt;996377+colby-swandale@users.noreply.github.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This specifies the lockfile location. This allows for easy support
of different lockfiles per Ruby version or platform.

https://github.com/ruby/rubygems/commit/b54d65bc0a

Co-authored-by: Sutou Kouhei &lt;kou@cozmixng.org&gt;
Co-authored-by: Colby Swandale &lt;996377+colby-swandale@users.noreply.github.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>[ruby/rubygems] Handle BUNDLER_VERSION being set to an empty string</title>
<updated>2025-11-19T01:27:25+00:00</updated>
<author>
<name>Cody Cutrer</name>
<email>cody@instructure.com</email>
</author>
<published>2023-08-30T22:52:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=83b0cfe1b5d5cab1328aeeac0c1c6eb2484b66de'/>
<id>83b0cfe1b5d5cab1328aeeac0c1c6eb2484b66de</id>
<content type='text'>
This is useful, in case you're using Docker, and an upstream
Dockerfile sets BUNDLER_VERSION to something you don't want.
It's impossible to unset it... only override to be the empty
string.

https://github.com/ruby/rubygems/commit/ffa3eb9ac6
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is useful, in case you're using Docker, and an upstream
Dockerfile sets BUNDLER_VERSION to something you don't want.
It's impossible to unset it... only override to be the empty
string.

https://github.com/ruby/rubygems/commit/ffa3eb9ac6
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Make "bundler? update --bundler" behave identically</title>
<updated>2024-06-20T00:12:31+00:00</updated>
<author>
<name>Yuri Kanivetsky</name>
<email>yuri.kanivetsky@gmail.com</email>
</author>
<published>2024-06-19T15:58:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=84c9f2a240a623c4bb1a19fd6c63f9fd3c7e4315'/>
<id>84c9f2a240a623c4bb1a19fd6c63f9fd3c7e4315</id>
<content type='text'>
https://github.com/rubygems/rubygems/commit/30dce3f87d
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rubygems/rubygems/commit/30dce3f87d
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Remove now unnecessary dups</title>
<updated>2023-11-13T02:06:10+00:00</updated>
<author>
<name>David Rodríguez</name>
<email>deivid.rodriguez@riseup.net</email>
</author>
<published>2023-10-27T18:50:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=3757d9027c612c88fdbf449eacf7f8f6c9b2e932'/>
<id>3757d9027c612c88fdbf449eacf7f8f6c9b2e932</id>
<content type='text'>
https://github.com/rubygems/rubygems/commit/56ce2a6445
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rubygems/rubygems/commit/56ce2a6445
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Drop support for Ruby 2.6 and Ruby 2.7 in RubyGems</title>
<updated>2023-11-13T02:06:10+00:00</updated>
<author>
<name>David Rodríguez</name>
<email>deivid.rodriguez@riseup.net</email>
</author>
<published>2023-10-26T20:11:34+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=54511303a46901a82e9b2d4ee460b2048e59a2e5'/>
<id>54511303a46901a82e9b2d4ee460b2048e59a2e5</id>
<content type='text'>
https://github.com/rubygems/rubygems/commit/10c26a483d
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rubygems/rubygems/commit/10c26a483d
</pre>
</div>
</content>
</entry>
<entry>
<title>[rubygems/rubygems] Change enforce style with Layout/CaseIndentation on rubygems</title>
<updated>2023-03-16T01:59:11+00:00</updated>
<author>
<name>Hiroshi SHIBATA</name>
<email>hsbt@ruby-lang.org</email>
</author>
<published>2023-03-15T09:06:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.ruby-lang.org/ruby.git/commit/?id=760b8b7d2413670808499eb972abe61400fe6b46'/>
<id>760b8b7d2413670808499eb972abe61400fe6b46</id>
<content type='text'>
https://github.com/rubygems/rubygems/commit/d4938259c4
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
https://github.com/rubygems/rubygems/commit/d4938259c4
</pre>
</div>
</content>
</entry>
</feed>
