[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Trouble using ssh gem in OSX; can't load the library.

Anton Blaga

6/14/2008 1:26:00 AM

Bare with me here as I am very new to all of this.

I'm trying to write a simple script with the SSH gem and when I run it
in the terminal I get this message.

/ssh_restart.rb:3:in `require': no such file to load -- net/ssh
(LoadError)


Here is the code:

#!/usr/bin/ruby

require 'net/ssh'

Net::SSH.start('10.0.1.200', 'Administrator', 'pw') do |ssh|
Dir.foreach('.') do |file|
puts file
end
end


What am I doing wrong?
--
Posted via http://www.ruby-....

2 Answers

Hassan Schroeder

6/14/2008 1:39:00 AM

0

On Fri, Jun 13, 2008 at 6:25 PM, Anton Blaga <antonblaga@gmail.com> wrote:

> ./ssh_restart.rb:3:in `require': no such file to load -- net/ssh
> (LoadError)

> #!/usr/bin/ruby

# insert here:
require 'rubygems'

> require 'net/ssh'

--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com

Anton Blaga

6/14/2008 1:45:00 AM

0

I JUST figured this out before you posted... thanks though!


--
Posted via http://www.ruby-....