2014年3月31日 星期一

[Note] Ruby - SSH 問題筆記

Error : [no such file to load -- net/ssh]

Version : Ubuntu 12.04
               Ruby 1.9.3

I was trying to login my server by using ssh in ruby .






I got this error :




There are two ways can check where the problem is if you got this error .

[Solution 1]

add this code at top :

require  'rubygems'

[Solution 2]

If you use net-ssh first , you may probably  not install 'net-ssh' yet .

It can be checked if you type the shell below:

gem list net-ssh

If not install , you need to install the gem . 

type the shell below :

gem install net-ssh


Then , the problem is solved.




沒有留言:

張貼留言