Help with net/ssh

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

hi Jay,

probably you need to also to

‘require rubygems’

André

Jay D. 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

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

Thanks.

Andre F. wrote:

hi Jay,

probably you need to also to

‘require rubygems’

André