I posted this a few days back, and I never got a response. But I'm still
having the problem, and I still don't understand it. I'm running on Win2k
and Ruby 1.6.2 from the single click installer. I'd really appreciate any
help that I could get.
The line of code with the problem is...
@connection = Net::Telnet.new('Host' => @hostname.value)
The error message is:
error: /cygdrive/c/ruby/lib/ruby/1.6/net/telnet.rb:324:in `open': Invalid
argument - "connect(2)"
The relevant block from telnet.rb is:
if @options["Timeout"] == false
@sock = TCPsocket.open(@options["Host"], @options["Port"])
else
timeout(@options["Timeout"]) do
@sock = TCPsocket.open(@options["Host"], @options["Port"])
end
end
Line 324 with the error is the assignment in the else clause. Inspecting
the @options structure reveals that it's perfectly normal -- particularly,
the port is 23 and the host is correct.
This happens intermittently -- in my test cases it happens about 20% of the
time, but from the Tk interface, it's happening close to 100% of the time.
I'm not even completely sure what the error message means here -- and I
can't tell what I'm doing wrong.
Thanks,
Noel Rappin