Reputation: 1616
I am using ruby 1.8.7 (2013-06-27 patchlevel 374) [i686-darwin14]
. When I try to install the capistrano gem I get the following error:
sudo gem install capistrano -v2.13.5
ERROR: Error installing capistrano:
net-ssh requires Ruby version >= 2.0.
AFAIK capistrano 2.13.5
should be compatible with ruby 1.8.7
How can I install capistrano v2.13.5
with ruby 1.8.7
(<2.0) installed?
Upvotes: 4
Views: 4606
Reputation: 1766
Capistrano is trying to install latest version of its dependency (net-ssh) which is not compatible with ruby versions prior v2.0. The solution is to install proper version of that dependency prior to installing capistrano. Proper version means the dependency is compatible with both Ruby and capistrano. In this case that is net-ssh v 2.6.5. So following sequence works:
gem install net-ssh -v 2.6.5
gem install capistrano -v 2.13.5
Upvotes: 1
Reputation: 693
I had the same error message when installing Capifony in Ubuntu 14.04. I did this:
# gem install net-ssh -v 2.9.2
And then this:
# gem install capifony
It worked.
I found the solution described here.
Upvotes: 5
Reputation: 3188
Even after installing the dependancies the capistrano installation process was asking for net-ssh that required ruby >= 2.
I had to download the source that I wanted from https://github.com/capistrano/capistrano/releases. Unzip, cd into the directory, and run:
gem build capistrano.gemspec
gem install --local capistrano-2.15.5.gem
Upvotes: 1
Reputation: 1616
I have sorted this problem out manually installing the capistrano dependencies. Execute the following commands if you have the same problem:
sudo gem install net-sftp -v2.0.0
sudo gem install net-scp -v1.0.0
sudo gem install net-ssh-gateway -v1.1.0
sudo gem install capistrano -v2.13.5
Upvotes: 6