Skip to content

Instantly share code, notes, and snippets.

@jraines
Created May 18, 2011 19:19
Show Gist options
  • Save jraines/979314 to your computer and use it in GitHub Desktop.
Save jraines/979314 to your computer and use it in GitHub Desktop.
Deploying with bundler - RailsConf 11 notes

####Scope your gems to your app:

bundle install --path vendor/bundle

####Ensure that bundle install has been run locally

(ie, there are no gems in Gemfile that do not match the lockfile

bundle install --frozen

####Better yet:

bundle install --deployment combines these two excellent features.

####Even better yet:

require 'bundler/capistrano'

This is configurable:

set :bundle_without, :test ...and many more at http://www.gembundler.com

####Misc

Bundler 1.1 will be faster at fetching source index and be able to reference gems on github more easily :github => 'rails/rails'

The Gemfile.lock ensures that even if you haven't specified specific gem versions, other people who bundle install in your app will get the same versions that were found when the lockfile was generated.

Generally, when doing other commands in your app: use bundle exec

Stop using the mysql gem. Use the mysql2 gem.

Read up on: bundle config

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment