Has anyone out there seen this error before? I haven't been able to find any reference to SUPPORTED_TYPE in the source...
irb(main):013:0> connection = Net::SSH.start('host', 'user', :password => 'password') NameError: uninitialized constant Net::SSH::KnownHosts::SUPPORTED_TYPE from /usr/lib/ruby/gems/1.8/gems/net-ssh-2.5.1/lib/net/ssh/known_hosts.rb:117:in `keys_for' from /usr/lib/ruby/gems/1.8/gems/net-ssh-2.5.1/lib/net/ssh/known_hosts.rb:105:in `each_line' from /usr/lib/ruby/gems/1.8/gems/net-ssh-2.5.1/lib/net/ssh/known_hosts.rb:105:in `keys_for' from /usr/lib/ruby/gems/1.8/gems/net-ssh-2.5.1/lib/net/ssh/known_hosts.rb:103:in `open' from /usr/lib/ruby/gems/1.8/gems/net-ssh-2.5.1/lib/net/ssh/known_hosts.rb:103:in `keys_for' from /usr/lib/ruby/gems/1.8/gems/net-ssh-2.5.1/lib/net/ssh/known_hosts.rb:33:in `search_in' from /usr/lib/ruby/gems/1.8/gems/net-ssh-2.5.1/lib/net/ssh/known_hosts.rb:33:in `map' from /usr/lib/ruby/gems/1.8/gems/net-ssh-2.5.1/lib/net/ssh/known_hosts.rb:33:in `search_in' from /usr/lib/ruby/gems/1.8/gems/net-ssh-2.5.1/lib/net/ssh/known_hosts.rb:27:in `search_for' from /usr/lib/ruby/gems/1.8/gems/net-ssh-2.5.1/lib/net/ssh/transport/algorithms.rb:237:in `prepare_preferred_algorithms!' from /usr/lib/ruby/gems/1.8/gems/net-ssh-2.5.1/lib/net/ssh/transport/algorithms.rb:120:in `initialize' from /usr/lib/ruby/gems/1.8/gems/net-ssh-2.5.1/lib/net/ssh/transport/session.rb:79:in `new' from /usr/lib/ruby/gems/1.8/gems/net-ssh-2.5.1/lib/net/ssh/transport/session.rb:79:in `initialize' from /usr/lib/ruby/gems/1.8/gems/net-ssh-2.5.1/lib/net/ssh.rb:186:in `new' from /usr/lib/ruby/gems/1.8/gems/net-ssh-2.5.1/lib/net/ssh.rb:186:in `start' from (irb):13 from /usr/lib/ruby/site_ruby/1.8/rubygems/specification.rb:1313
The easier solution is to use this forked version of net-ssh which fixes that issue (the next release of the official net-ssh gem should fix it as well) as described here.
If you have that issue while deploying through capistrano (which I had today), you can install this net-ssh version from github through the Gemfile and then call cap by using
bundle exec cap deploy
.Put in the Gemfile
gem 'net-ssh', :git => 'git://github.com/nessche/net-ssh.git'
.