Upgrading To Capistrano2

The Situation

You have been using Capistrano and the Railsmachine gem. You have your deployment working just the way you like it. Change is scary.

The Fix

Upgrading to Capistrano 2 is no big deal. The biggest change is the use of namespacing in tasks. Instead of cap deploy_with_migrations, you’ll use cap deploy:migrations. Most of the time you will still simply call ‘cap deploy’ to update your code.

might become this

namespace :custom do
  task :update, :roles => :app do
    # ...
  end
end
after :deploy,"custom:update"

That’s it!

Be sure to commit your changes to Subversion. Run ‘cap -T’ to view the full list of tasks.

Meta