Skip to content

Commit a88fe81

Browse files
authored
Default bundler to 2.5.23 (heroku#1708)
If your `Gemfile.lock` doesn’t include the `BUNDLED WITH` key, Heroku installs a [default bundler version](https://devcenter.heroku.com/articles/ruby-support-reference#default-bundler-version): - Apps using [Classic Buildpacks](https://devcenter.heroku.com/articles/buildpacks#classic-buildpacks) was `2.3.25` now `2.5.23` - Apps using [Cloud Native Buildpacks](https://devcenter.heroku.com/articles/buildpacks#heroku-cloud-native-buildpacks) stays `2.5.23` >note >Ruby's [standard version of bundler](https://stdgems.org/bundler/) takes precedence if it's greater than Heroku's installed version. When there is no `BUNDLED WITH` in the `Gemfile.lock`, then `bundle install` uses the highest version of Bundler available. It is strongly recommended that you have both a `RUBY VERSION` and `BUNDLED WITH` version listed in your `Gemfile.lock`. If you do not have those values, you can generate them and commit them to git: ``` $ bundle update --ruby $ git add Gemfile.lock $ git commit -m "Update Gemfile.lock" ``` Applications without these values specified in the `Gemfile.lock` may break unexpectedly when the defaults change. This is an alternative to downgrading the CNB version heroku#1706 (comment).
1 parent 3263e93 commit a88fe81

3 files changed

Lines changed: 21 additions & 2 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## [Unreleased]
44

55
- Add metric: Track apps with and without `BUNDLED WITH` in the `Gemfile.lock`
6+
- Default bundler version changed from `2.3.25` to `2.5.23`. Ruby's [standard version of bundler](https://stdgems.org/bundler/) will take precedence if it is greater than Heroku's installed version. When there is no `BUNDLED WITH` in the `Gemfile.lock`, then `bundle install` will use the highest version of Bundler available.
67

78
## [v345] - 2026-01-26
89

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## Ruby applications with no specified bundler versions now receive Bundler 2.5.23
2+
3+
If your `Gemfile.lock` doesn’t include the `BUNDLED WITH` key, Heroku installs a [default bundler version](https://devcenter.heroku.com/articles/ruby-support-reference#default-bundler-version):
4+
5+
- Apps using [Classic Buildpacks](https://devcenter.heroku.com/articles/buildpacks#classic-buildpacks) was `2.3.25` now `2.5.23`
6+
- Apps using [Cloud Native Buildpacks](https://devcenter.heroku.com/articles/buildpacks#heroku-cloud-native-buildpacks) stays `2.5.23`
7+
8+
>note
9+
>Ruby's [standard version of bundler](https://stdgems.org/bundler/) takes precedence if it's greater than Heroku's installed version. When there is no `BUNDLED WITH` in the `Gemfile.lock`, then `bundle install` uses the highest version of Bundler available.
10+
11+
It is strongly recommended that you have both a `RUBY VERSION` and `BUNDLED WITH` version listed in your `Gemfile.lock`. If you do not have those values, you can generate them and commit them to git:
12+
13+
```
14+
$ bundle update --ruby
15+
$ git add Gemfile.lock
16+
$ git commit -m "Update Gemfile.lock"
17+
```
18+
19+
Applications without these values specified in the `Gemfile.lock` may break unexpectedly when the defaults change.

lib/language_pack/helpers/bundler_wrapper.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,7 @@
2929
class LanguagePack::Helpers::BundlerWrapper
3030
include LanguagePack::ShellHelpers
3131

32-
# Heroku-22's oldest Ruby version is 3.1
33-
DEFAULT_VERSION = "2.3.25"
32+
DEFAULT_VERSION = "2.5.23"
3433

3534
attr_reader :bundler_path
3635

0 commit comments

Comments
 (0)