This answer solved my problem. I created a file called .rails-env
which contains a simple string specifying the environment bundler should use. This file must be kept out of the repository. If not present, bundler defaults to development.
The second part of the problem was that I had to adjust my deployment procedure. I created a small script that runs bundle update
under the development environment and waits for a key press before doing the same for production. Once the development Gemfile.lock files are generated, I push the changes to my develop
repository branches. After it runs through production, I push to master
.