Skip to content

Commit 173cad6

Browse files
authored
Update bundler version warning (heroku#1697)
Previously the output would look like this: ``` �[1m�[33m###### WARNING:�[0m Your app was upgraded to bundler 2.3.7. Previously you had a successful deploy with bundler 2.3.25. If you see problems related to the bundler version please refer to: https://devcenter.heroku.com/articles/bundler-version#known-upgrade-issues -----> Using Ruby version: ruby-3.1.2 -----> Installing bundler 2.3.7 -----> Installing dependencies using bundler 2.3.7 Running: BUNDLE_WITHOUT='development:test' BUNDLE_PATH=vendor/bundle BUNDLE_BIN=vendor/bundle/bin BUNDLE_DEPLOYMENT=1 bundle install -j4 [1121, #<Thread:0x00007f1ff87f7c58 run>, #<NameError: uninitialized constant Gem::Source (defined?(@source) && @source) || Gem::Source::Installed.new ^^^^^^^^ Did you mean? Gem::SourceList>, ``` Now it directs them on how to fix the problem directly.
1 parent d35d472 commit 173cad6

2 files changed

Lines changed: 15 additions & 4 deletions

File tree

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
## [Unreleased]
44

5+
- Update bundler version warning output (https://github.com/heroku/heroku-buildpack-ruby/pull/1697)
56

67
## [v341] - 2026-01-09
78

lib/language_pack/ruby.rb

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -172,12 +172,22 @@ def self.warn_bundler_upgrade(metadata: , bundler_version: )
172172

173173
if old_bundler_version && old_bundler_version != bundler_version
174174
warn(<<~WARNING, inline: true)
175-
Your app was upgraded to bundler #{ bundler_version }.
176-
Previously you had a successful deploy with bundler #{ old_bundler_version }.
175+
Your bundler version changed from `#{old_bundler_version}` to `#{bundler_version}`.
177176
178-
If you see problems related to the bundler version please refer to:
179-
https://devcenter.heroku.com/articles/bundler-version#known-upgrade-issues
177+
If you see problems related to the new bundler version, you can revert to the previous version
178+
by updating the `BUNDLED WITH` value in your `Gemfile.lock`. For example:
180179
180+
```
181+
BUNDLED WITH
182+
#{old_bundler_version}
183+
```
184+
185+
Commit the results to git before redeploying:
186+
187+
```
188+
$ git add Gemfile.lock
189+
$ git commit -m "Revert to previous bundler version"
190+
```
181191
WARNING
182192
end
183193
end

0 commit comments

Comments
 (0)