What the?
The following code(see below) works fine in a few of my ruby scripts but
fails on others with the following message:
'/scripts/ruby/testssh.rb:4: undefined method `exitstatus' for
nil:NilClass (NoMethodError)'.
I know ssh is working and I can run ssh commands to #{hostname} using
#{username} credentials. I use this exact code in other scripts from the
same workstation, ssh'ing to the same remote host and it works fine.
I've copied the following lines and pasted them unto a new file and it
still fails with the above message.
'/scripts/ruby/testssh.rb:4: undefined method `exitstatus' for
nil:NilClass (NoMethodError)'.
I know ssh is working and I can run ssh commands to #{hostname} using
#{username} credentials. I use this exact code in other scripts from the
same workstation, ssh'ing to the same remote host and it works fine.
I've copied the following lines and pasted them unto a new file and it
still fails with the above message.