Forum: Ruby A question about Net-ssh

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Zhao Y. (Guest)
on 2009-01-04 14:28
I installed net-ssh by running the command: "gem install net-ssh", but I
got load error when using "require net/ssh". It seems that ruby doesn't
find the library. How can I let ruby find this library?

thanks.
Jan-Erik R. (Guest)
on 2009-01-04 16:15
(Received via mailing list)
Zhao Yi schrieb:
> I installed net-ssh by running the command: "gem install net-ssh", but I
> got load error when using "require net/ssh". It seems that ruby doesn't
> find the library. How can I let ruby find this library?
>
> thanks.
do you have a "require 'rubygems'" above your "require 'net/ssh'" ?
Daniel B. (Guest)
on 2009-01-04 16:21
(Received via mailing list)
Zhao Yi wrote:
> I installed net-ssh by running the command: "gem install net-ssh", but I
> got load error when using "require net/ssh". It seems that ruby doesn't
> find the library. How can I let ruby find this library?
>
> thanks.

Try "require 'rubygems'" first.

If you want rubygems loaded automatically when you use ruby, set your
RUBYOPT environment variable to "-rubygems".

Regards,

Dan
This topic is locked and can not be replied to.