We use capistrano for rails deployment. Here is a strange error when running bundle install on production server.
You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.
If this is a development machine, remove the Gemfile freeze
by running `bundle install --no-deployment`.
You have added to the Gemfile:
* rails (= 3.1.3)
* mysql2 (>= 0.2.6)
You have deleted from the Gemfile:
* rails (~> 3.1.3)
Gemfile on production server was manually changed and then, this error comes out. This is a new production server and we plan to run rails 3.1.3. We rebooted the linux server and it did not help. Is there way to fix the problem? thanks so much.
I guess, you’re using some deployment solution, like Capistrano. If this is the case, change the Gemfile on a development machine, run
bundle install, commit everything into the repository and deploy again.Don’t ever change code manually on the server, it’s gonna be bad for your karma.
Edit:
If you want to use some specific gems in production only, add them to production group.