Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
help with net/ssh
Jay Dev
7/26/2007 2:54:00 PM
hey guys,
I'm new to Ruby and Rails. I posted this in Rails forum, but I'm also
posting here. Hopefully it isn't a big deal.
My setup is Locomotive on Mac OS X.
When I try to run the below code, I get the below error. What do you
guys think?
Code:
require 'net/ssh'
session = Net::SSH.start( 'host', 'username', 'passwd')
puts 'successful'
session.close
Output:
~/Documents/Programs/Ruby/Depot$ ruby ssh_test.rb
ssh_test.rb:1:in `require': no such file to load -- net/ssh (LoadError)
from ssh_test.rb:1
Thanks,
Dev
--
Posted via
http://www.ruby-...
.
2 Answers
Andre Ferreira
7/26/2007 3:02:00 PM
0
hi Jay,
probably you need to also to
'require rubygems'
André
Jay Dev wrote:
> hey guys,
> I'm new to Ruby and Rails. I posted this in Rails forum, but I'm also
> posting here. Hopefully it isn't a big deal.
> My setup is Locomotive on Mac OS X.
>
> When I try to run the below code, I get the below error. What do you
> guys think?
>
> Code:
> require 'net/ssh'
>
> session = Net::SSH.start( 'host', 'username', 'passwd')
>
> puts 'successful'
> session.close
>
>
> Output:
>
> ~/Documents/Programs/Ruby/Depot$ ruby ssh_test.rb
> ssh_test.rb:1:in `require': no such file to load -- net/ssh (LoadError)
> from ssh_test.rb:1
>
>
> Thanks,
> Dev
--
Posted via
http://www.ruby-...
.
Jay Dev
7/26/2007 3:07:00 PM
0
Hi Andre,
Thanks for the reply.
That worked!!
I added require 'rubygems' in the first line.
Thanks.
Andre Ferreira wrote:
> hi Jay,
>
> probably you need to also to
>
> 'require rubygems'
>
> André
>
>
>
--
Posted via
http://www.ruby-...
.
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
help with net/ssh
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password