help with net/ssh

J

Jay Dev

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
 
J

Jay Dev

Hi Andre,
Thanks for the reply.
That worked!!
I added require 'rubygems' in the first line.

Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,264
Messages
2,571,314
Members
47,993
Latest member
Meri511146

Latest Threads

Top