English 中文(简体)
设置 net- ssh 连接时支持_ type 错误
原标题:SUPPORTED_TYPE error when setting up a net-ssh connection

有谁见过这个错误吗?

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
最佳回答
问题回答

5月24日更新2. 5.0 或2.5.1 对净宝石的更新,

http://net-ssh.github.com/net-ssh/class/Net/SSH/KnownHosts.html

我不知道所有的细节, 但这个问题到目前为止已有几个解决方案。 一个是删除您已知的主机文件( 或您试图从该文件中连接到的具体主机), 并且您也许能够连接到主机再次加入已知的主机 。 如果它存在, 它会因某种原因返回相同的错误 。

我找到的第二个选择是回到宝石的2.4.0版本。

< a href=>http://net-ssh. lightrhousepp.com/projects/36253-net-ssh/tickets/58-nameerror-un reminized-constatent-netsshnownwosts support_type" rel="nofollow">http://net-ssh. lightrhousepp.com/projects/36253-net-ssh/tickets/58-nameerror-unstimized-constatent-netsshnocksswards suppide_type/a>

希望它能帮上忙!

克拉里夫的解决方案看起来更能让人接受,谢谢,克拉里夫!

在关注了Github问题并运用了Clarif的建议之后,我提出了解决我问题的办法。

http://tinyurl.com/cxr2xA3





相关问题
Ruby parser in Java

The project I m doing is written in Java and parsers source code files. (Java src up to now). Now I d like to enable parsing Ruby code as well. Therefore I am looking for a parser in Java that parses ...

rails collection_select vs. select

collection_select and select Rails helpers: Which one should I use? I can t see a difference in both ways. Both helpers take a collection and generates options tags inside a select tag. Is there a ...

RubyCAS-Client question: Rails

I ve installed RubyCAS-Client version 2.1.0 as a plugin within a rails app. It s working, but I d like to remove the ?ticket= in the url. Is this possible?

Ordering a hash to xml: Rails

I m building an xml document from a hash. The xml attributes need to be in order. How can this be accomplished? hash.to_xml

multiple ruby extension modules under one directory

Can sources for discrete ruby extension modules live in the same directory, controlled by the same extconf.rb script? Background: I ve a project with two extension modules, foo.so and bar.so which ...

Text Editor for Ruby-on-Rails

guys which text editor is good for Rubyonrails? i m using Windows and i was using E-Texteditor but its not free n its expired now can anyone plese tell me any free texteditor? n which one is best an ...

热门标签