Skip to content

Instantly share code, notes, and snippets.

@ParkinT
Last active August 29, 2015 14:02
Show Gist options
  • Save ParkinT/084dbb12252ab8b17dff to your computer and use it in GitHub Desktop.
Save ParkinT/084dbb12252ab8b17dff to your computer and use it in GitHub Desktop.
Recently I encountered a strange error in a capistrano script that has always worked in the past. Apparently, it was the result of an update to the net-ssh gem on my Nitrous box

Nitrous-Charged Gist Cap Deploy rollback on Net::SSH::Authentication error

I use Nitrous as my primary development environment. The ability to work on any one of a number of projects at any time and from anywhere is simply too convenient to overlook. {As a matter of fact, I am writing this on a Nitrous box from a hospital bed!}

On a site I have been maintaining and continuously updating (on a drogo - Ruby/Rails Nitrous box), my capistrano deploy script failed one day.

One day my Capistrano deploy for the site returned [deploy:update_code] exception while rolling back: Capistrano::ConnectionError, connection failed for: ...

The error message was a bit confusing because it pointed to SSH authentication for my deploy user; with which I could easily connect from the Nitrous console command line.

A bit of digging on the Interent revealed this was a problem that crops up when the net-ssh gem is updated. I was suddenly running net-ssh 2.9.1 but this problem with capistrano will be resolved if I run net-ssh version 2.7.

On my Digital Ocean Droplet I then had to realign a few other gems. I uninstalled and reinstalled with specific versions the following:

  • net-ssh -v 2.9.2
  • net-scp -v 1.2.1

And my rake needed to be updated to 10.3.2

I hope this will help you if you found this during a frustrated Internet search.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment