engineyard/eycap — comment on commit fb260c302358aaef2974dbb45c8e02d7a0719104
File:  line 0
By jefflab:

As a followup, the problem was that I needed to add the following to my Capistrano comments

require 'bundler/capistrano'
set :bundle_dir, fetch(:shared_path)+"/bundled_gems"
set :bundle_flags, "--deployment"
set :bundle_without, [:development, :test]
set :bundle_roles, :web

Before, the codebase I'm working on was accomplishing this same functionality with a custom task:

desc "Symlink Bundler deployment directory"
task :symlink_bundle, :roles => :app, :except => { :no_release => true } do
run "rm -rf #{release_path}/vendor/bundle"
run "ln -s #{shared_path}/bundled_gems #{release_path}/vendor/bundle"
run "cd #{current_path} && bundle install --deployment"
end

So, I believe the real problem was not my bundler version but the fact that I didn't require 'bundler/capistrano'.

Ideally it would be great if this code was smart enough to detect the inclusion of this dependency and act accordingly. Or, at the very least you could simplify this line to:

# bundle exec added by 'bundler/capistrano'
run "cd #{directory}; #{rake} #{framework.upcase}_ENV=#{app_env} #{migrate_env} db:migrate ;"