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.
7fbd0e99b27064b14793f028022974e5?d=identicon&s=25 Zhao Yi (youhaodeyi)
on 2009-01-04 13: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.
245a6d22816ecaeac1c9080ad183b859?d=identicon&s=25 Jan-Erik R. (Guest)
on 2009-01-04 15: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'" ?
Aee77dba395ece0a04c688b05b07cd63?d=identicon&s=25 Daniel Berger (djberg96)
on 2009-01-04 15: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.