Ruby applications with no specified bundler versions now receive Bundler 2.3.x. Bundler 1.x will no longer work.

Change effective on 19 March 2025

Update (March 21, 2025): Bundler 1.x will now work on the platform until April 30, 2025. We still highly recommend upgrading bundler versions as soon as possible. The directions below have been updated from their original wording.

Previously applications with no BUNDLED WITH in their Gemfile.lock would receive bundler 1.x. They will now receive the new default bundler version 2.3.x.

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.

Bundler 1.x will no longer work on Heroku after April 30th.

If you’re limited to bundler 1.x due to a dependency on rails this post has some suggestions that may help Upgrading Ruby versions to run on Heroku-24 .

Customers using Bundler 1.x will see an error message when deploying and are encouraged to upgrade to Bundler 2.3.27. To fix upgrade your bundler version. Run:

$ gem install bundler -v 2.3.27
$ bundle update --bundler

Verify that the correct version is listed in the Gemfile.lock:

$ cat Gemfile.lock | grep "BUNDLED WITH" -A2
BUNDLED WITH
   2.3.27

And check the results into git:

$ git add Gemfile.lock
$ git commit -m "Update bundler version to 2.3.x"

Upgrading your application Bundler 2.3.x+ fixes the exception. For more information see Ruby support for Bundler 1.x re-enabled until April 30th, 2025 published March 21, 2025.