U
Une Bévue
following the page :
<http://drnicwilliams.com/2006/09/22/remote-shell-with-ruby/>
i've uninstalled net-ssh and the like then,
intall needle-1.3.0.gem
and re-installed :
net-ssh-2.0.3.gem
net-scp-1.0.1.gem
net-ssh-gateway-1.0.0.gem
net-ssh-multi-1.0.0.gem
after that, i wanted to test a small piece of code :
------------------------------------------------------------------------
#! /usr/bin/env ruby
require 'rubygems'
require 'needle'
require 'net/ssh'
require 'lib/preferences' # gives the options
require 'lib/tt_check' # gives tt_connected? (verify the USB-lan is
connected)
if tt_connected?
result=""
session=Net::SSH.start("TT", "root", options)
shell=session.shell.sync ### <<<=== line 13
out=shell.send_command 'ls -lart'
puts out.stdout
else
puts "Twin-Tact is not connected."
end
------------------------------------------------------------------------
and i got :
$ ./ssh_shell_sync.rb
../ssh_shell_sync.rb:13: undefined method `shell' for
#<Net::SSH::Connection::Session:0x16b4fd0> (NoMethodError
then, i wonder if there is a special way to install net-ssh to let it
take into account "Needle" ???
<http://drnicwilliams.com/2006/09/22/remote-shell-with-ruby/>
i've uninstalled net-ssh and the like then,
intall needle-1.3.0.gem
and re-installed :
net-ssh-2.0.3.gem
net-scp-1.0.1.gem
net-ssh-gateway-1.0.0.gem
net-ssh-multi-1.0.0.gem
after that, i wanted to test a small piece of code :
------------------------------------------------------------------------
#! /usr/bin/env ruby
require 'rubygems'
require 'needle'
require 'net/ssh'
require 'lib/preferences' # gives the options
require 'lib/tt_check' # gives tt_connected? (verify the USB-lan is
connected)
if tt_connected?
result=""
session=Net::SSH.start("TT", "root", options)
shell=session.shell.sync ### <<<=== line 13
out=shell.send_command 'ls -lart'
puts out.stdout
else
puts "Twin-Tact is not connected."
end
------------------------------------------------------------------------
and i got :
$ ./ssh_shell_sync.rb
../ssh_shell_sync.rb:13: undefined method `shell' for
#<Net::SSH::Connection::Session:0x16b4fd0> (NoMethodError
then, i wonder if there is a special way to install net-ssh to let it
take into account "Needle" ???