Posted about 1 year ago. Visible to the public.

During deployment: "You are trying to install in deployment mode after changing your Gemfile"

While deploying an Ruby update to an old application these days, we encountered the following misleading error:

*** [err ::] You are trying to install in deployment mode after changing *** [err ::] your Gemfile. Run `bundle install` elsewhere and add the *** [err ::] updated Gemfile.lock to version control. *** [err ::] *** [err ::] You have deleted from the Gemfile: *** [err ::] *

We found out a newer version of bundler runs on the machines to be deployed to (see bundle -v, it was 2.0.1 in our case) while in the Gemfile.lock an old version of bundler is mentioned in the BUNDLED_WITH block:


This broke during deployment while Capistrano tries to run bundle --deployment --quiet --without development test. On our development machines bundle install run successfully.

Fix this by making sure both sides use the same major versions of bundler (preferably 2.x).

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 Eisenbarth
Last edit:
about 1 year ago
by Besprechungs-PC
About this deck:
We are makandra and do test-driven, agile Ruby on Rails software development.
License for source code
Posted by Thomas Eisenbarth to makandra dev
This website uses cookies to improve usability and analyze traffic.
Accept or learn more