Posted 17 days ago. Visible to the public.

Update a projects bundler version

We use bundler to maintain a projects gems. Unfortunately bundler v1 itself is incompatible with bundler v2.
If you need to upgrade bundler on a managed server to the latest version you can do:

gem install bundler -v '~>2'

After you installed bundler v2, tell bundler to update your Gemfile.lock and bundler binary

bundle update --bundler bundle install

Common issues / mistakes:
- Be careful! bundler update --bundler produces nearly the same output, but does not update your Gemfile.lock
Even if some people on the web say the bundle and bundler binaries can be used interchangeably.
- Rubygems can't find bundle executable
- Do not change the bundler version in your Gemfile.lock manually, it may work on your local machine, but not on the server.

If you do not need bundler v1 anymore, uninstall the old version with

gem uninstall bundler

Rubygems asks you which version of bundler you want to uninstall.

Now update the project on your local machine the same way, and deploy it to the server.

Does your version of Ruby on Rails still receive security updates?
Rails LTS provides security patches for old versions of Ruby on Rails (3.2 and 2.3).

Owner of this card:

Thomas Tasler
Last edit:
17 days ago
by Thomas Tasler
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Thomas Tasler to makandra dev
This website uses cookies to improve usability and analyze traffic.
Accept or learn more