Install Capistrano 3 on Debian

This entry shows which steps to follow when installing Capistrano 3 on Debian. Root level access is required, on the same Jenkins machine used here.

NOTE: Capistrano 3 requires Ruby >= 1.9.

If Ruby 1.8 is installed, follow these steps to remove it, and install Ruby 1.9:

Based on

1. Remove ruby1.8:

apt-get remove ruby1.8 ruby

2. Install Ruby 1.9.2:

apt-get install ruby1.9.1 ruby1.9.1-dev

3. Link the ruby binary to /usr/bin/ruby:

ln -s /usr/bin/ruby1.9.1 /usr/bin/ruby

4. Download the latest rubygems to /tmp/, i.e. version 2.2.2:

cd /tmp/ && wget

5. Extract the archive:

tar -zxvf rubygems-2.2.2.tgz

6. Install:

cd rubygems-2.2.2/ && ruby setup.rb

7. Link the gem binary, to /usr/bin/gem:

ln -s /usr/bin/gem1.9.1 /usr/bin/gem

8. Test version, using:

gem -v


9. Remove temporary install directory and arhive:

rm -rf /tmp/rubygems-2.2.2 && rm /tmp/rubygems-2.2.2.tgz 

Last step, is to actually install Capistrano:

gem install capistrano

Test installed version:

cap --version

Capistrano Version: 3.2.1 (Rake Version: 10.3.2)

Leave a Reply

Your email address will not be published. Required fields are marked *