Deploying bundled applications

When you are ready to deploy your application, you should lock your bundle to guarantee that dependency versions will no longer change.
$ bundle lock
Learn More: bundle lock
Add your Gemfile and lockfile to source control, but ignore the .bundle folder, which is specific to each machine.
$ echo ".bundle" >> .gitignore
$ git add Gemfile Gemfile.lock .gitignore
$ git commit -m "Add bundler"

In your deploy script, after updating to the latest code, install your bundle to ensure all your dependencies are met.
$ bundle install
Start your application servers as usual, and your application will use your bundled environment just like it does locally in development.
Edit this document on GitHub if you caught an error or noticed something was missing.