Quantcast
Channel: Lasse Bunk's weblog » Capistrano
Viewing all articles
Browse latest Browse all 4

Rails 3 and Bundler: Deploying gems using Capistrano

$
0
0

Update: Instead, in the beginning of deploy.rb, use:

require "bundler/capistrano"

I have previously described how to deploy gems using Capistrano in a Rails 2 application. After upgrading to Rails 3, this has changed a bit. Rails now uses Bundler for dependency management, so we need to use the bundle install command instead of rake gems:install.

In your deploy.rb:

after "deploy:update_code", "bundle:install"

namespace :bundle do
  desc "Bundle install"
  task :install, :roles => :app do
    run "cd #{current_release} && #{sudo} bundle install"
  end
end

It’s as easy as that. Let me know if you have any comments.


Viewing all articles
Browse latest Browse all 4

Trending Articles