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.
It is recommended to fix the version number when using Capistrano, and is therefore recommended to use an appropriate bundler.
The following command will install the latest released capistrano
Or grab the bleeding edge head from:
$ gem install capistrano
### Usage in a Rails project Add the following lines to the Gemfile:
$ git clone https://github.com/capistrano/capistrano.git $ cd capistrano $ gem build *.gemspec $ gem install *.gem
The `capistrano-rails` gem includes extras specifically designed for Ruby on Rails, specifically: * Asset Pipeline Support * Database Migration Support The documentation for these components can be found in [their][capistrano-rails-asset-pipeline-readme], [respective][capistrano-rails-gem-bundler-readme], [READMEs][capistrano-rails-database-migrations-readme]. However for the most part, to get the best, and most sensible results, simply `require` in Capfile, after the `require 'capistrano/deploy'` line:
group :development do gem 'capistrano-rails', '~> 1.1.1' end
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:
This is the [pessimistic operator][rubygems-pessimistic-operator] which installs the closest matching version, at the time of writing this would install `2.15.4`, and any other point-release in the `2.15.x` family without the risk of accidentally upgrading to `v3`.
gem 'capistrano', '~> 2.15' # Or whatever patch release you are using