Currently, I'm just running the following:
after 'deploy:update_code', 'deploy:bundle'
namespace :deploy do
task :bundle do
run "cd #{release_path} && bundle install --deployment --without development test staging"
end
end
Now this works fine, but the bundler ends up installing all the gems to vendor/gems
every time. While I understand the merit in isolating the gems to each release (as opposed to using the shared folder, which (?) might result in errors on rollback and such), surely there is a better way to do this that doesn't take as much time to deploy and saves on disk space.
Things have changed after the release of bundler 1.0
You don't need to create a custom task from deploy.
just use require 'bundler/capistrano'
take a look at this http://blog.josephholsten.com/2010/09/deploying-with-bundler-and-capistrano/ for more details
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With