Capistrano is bundled as a Ruby Gem. It requires Ruby 1.9 or newer.
Capistrano can be installed as a standalone Gem, or bundled into your application.
The following command will install the latest released capistrano
$ gem install capistrano
Or grab the bleeding edge head from:
$ git clone https://github.com/capistrano/capistrano.git $ cd capistrano $ gem build *.gemspec $ gem install *.gem
Usage in a Rails project
Add the following lines to the Gemfile to the
:development group ideally.
group :development do gem 'capistrano-rails', '~> 1.0.0' end
There will be a Gem released via rubygems.org, but as most people
are still using Capistrano v2.x, the v3 release will not be pushed to
rubygems.org just yet give people a chance to lock their version
The Capistrano-Rails Gem includes extras specifically designed for Ruby on Rails, specifically:
- Asset Pipeline Support
- Database Migration Support
require 'capistrano/rails/assets' require 'capistrano/rails/migrations'
Help! I was using Capistrano `v2.x` and I didn't want to upgrade!If you are using Capistrano `v2.x.x` and have also installed Capistrano `v3` by mistake, then you can lock your Gem version for Capistrano at something like:
gem 'capistrano', '~> 2.15' # Or whatever patch release you are using
This is the pessimistic operator which
installs the closest matching version, at the time of writing this would
2.15.4, and any other point-release in the
2.15.x family without
the risk of accidentally upgrading to