Notes on Deploying Rails Apps Using Bundler

  1. Your deployment system MUST have the bundler gem installed
  2. `bundle install –deployment` requires a Gemfile.lock, so `bundle install [--without]` needs to be run first.
  3. `bundle install` will make a Gemfile.lock, even it doesn’t install any gems via `–without`, so if you don’t have access to install gems you don’t have to.
  4. `bundle install –deployment` will bundle the gems t0 vendor/bundle AND freeze the app in .bundle/config.
  5. If you do `bundle install –without` to make a Gemfile.lock on the same system you want t0 do `bundle install –deployment` you will have to trash .bundle in-between.
  6. If you want your bundle in your repository, you still need to run `bundle install –deployment` on other servers or also add .bundle, even though it is intended to be server specific, just so long as you have a .bundle/config with BUNDLE_FROZEN: 1.
  7. If you add .bundle to your repository you can get by without the bundle executable in your deployment server, but not the bundler gem.
  8. If your having trouble, trash .bundle, but make sure your deployment server has a .bundle/config with BUNDLE_FROZEN: 1 when you’re done bundling.