Net/ssh in ruby. ssh.exec fails

I just finished install net-ssh-2.1.0.gem.
And following v2 example, I did this:

irb(main):005:0> Net::SSH.start(“sh-ubuntu6”, “vdeadmin”, “fishbowl”) do
|ssh|
irb(main):006:1* puts ssh.exec(“pwd”)
irb(main):007:1> end
NoMethodError: private method `exec’ called for
#Net::SSH::Session:0xb7e33840

undefined method `exec!’
exec - private method.

any one has encountered this before?

I googled online, search in mailer archive, and tried with several
different versions of net/ssh.

none of them helps.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs