Ruby Weekly is a weekly newsletter covering the latest Ruby and Rails news.

Capistrano 2.0: Flexible Automated Deployment System

By Hendy Irawan / July 22, 2007

Capistrano is a deployment system written in Ruby by Jamis Buck. It has been the de facto standard for deploying Rails applications and automating remote tasks via SSH.

The recently released version 2.0 expands its usefulness not just for Rails developers, but for general automation tasks as well. New features include:

  • Namespaces. Tasks may be defined within namespaces, nested arbitrarily deep. No more worrying of task name collision.
  • Deployment strategies. Besides Subversion checkout, you can now specify other deployment strategies: export, copy, tar/gzip, etc.
  • Opt-in deployment tasks. Deployment tasks are now opt-in; you don't get them, unless you ask for them.
  • Event framework. Define hooks into other libraries easily.
  • capify script. Autogenerate a minimal Capfile, and not just for Rails.
  • Scoped execution. Scope a single invocation to a specific host, set of hosts, or role.

To install:

gem install capistrano

Capify your app:

capify .

Read Capistrano Basics for a quick start, and if you're a Rails developer, Using Capistrano with Rails. If you've used Capistrano 1.x before, be sure to read Upgrading to Capistrano 2.0.

Several useful Capistrano-related resources: (most are written with Capistrano 1.x in mind, but the concepts still apply to 2.0)

Jamis has written more information over at the official Rails blog.

About Hendy Irawan

Ruby programmer from Indonesia. View all posts by Hendy Irawan →


  1. Pingback: Web 2.0 with Ruby on Rails

Other Posts to Enjoy

Twitter Mentions