Why is Capistrano not installing gems with bundler?

Yuval Karmi picture Yuval Karmi · Jun 3, 2012 · Viewed 8.1k times · Source

Every time I deploy an app with Capistrano, it complains about missing gems. For example:

 ** [out :: mysite.com] Could not find WhateverGem-1.0.0 in any of the sources
 ** [out :: mysite.com] Run `bundle install` to install missing gems.

I resolve this by manually uploading my Gemfile, SSHing into the server, and running bundle install. However, this should not be happening.

Here's a copy of my deploy.rb and Capfile.

Could anybody point me in the right direction?

Answer

Jesse Wolgamott picture Jesse Wolgamott · Jun 3, 2012

You probably just need to add this to your config/deploy.rb

require "bundler/capistrano"