gemは問題無くできるものの、CIがエラー。

$ bundle exec rake
/home/vagrant/.rvm/gems/ruby-1.9.2-p290/gems/bundler-1.0.21/lib/bundler/rubygems_integration.rb:143:in `block in replace_gem': rake is not part of the bundle. Add it to Gemfile. (Gem::LoadError)
from /home/vagrant/.rvm/gems/ruby-1.9.2-p290/bin/rake:18:in `
' Done. Build script exited with: 1

よく見ればちゃんと書いてある。

# gemspec:
s.add_development_dependency 'rake', '~> 0.9.2.2'
s.add_development_dependency 'rdoc', '~> 3.11'

Tracis-CIでrakeとrdoc使うからdevelopment_dependencyには入れとかなきゃいけない。

Using Capistrano with rvm and bundler.

rvm

# config/deploy.rb:
$:.unshift(File.expand_path('./lib', ENV['rvm_path']))

require 'rvm/capistrano'

set :rvm_ruby_string, 'ruby-1.8.7-p352@kowabana' # Add gemset name if you want to use gemset.
set :rvm_type, :user # If rvm didn't installed to system wides.

bundler

# config/deploy.rb:
require 'bundler/capistrano'

It's all. When run cap deploy:update, Capistrano install gem in shared/bundle.