I run ruby on Windows 2000... it works wonderfully, except when
fetching web pages. If I do something like this:
require 'Net/Http'
data = Net::HTTP.get("www.rubycentral.com","/index.html")
p data
.... then 9 times out of 10 I get the following system call error:
/cygdrive/c/ruby/lib/ruby/1.6/net/protocol.rb:507:in `new': Invalid
argument - "connect(2)"(Errno::EINVAL)
from /cygdrive/c/ruby/lib/ruby/1.6/net/protocol.rb:507:in `new'
from /cygdrive/c/ruby/lib/ruby/1.6/net/protocol.rb:507:in
`connect'
from /cygdrive/c/ruby/lib/ruby/1.6/net/protocol.rb:506:in
`timeout'
from /cygdrive/c/ruby/lib/ruby/1.6/net/protocol.rb:506:in
`connect'
from /cygdrive/c/ruby/lib/ruby/1.6/net/protocol.rb:500:in
`initialize'
from /cygdrive/c/ruby/lib/ruby/1.6/net/protocol.rb:201:in `new'
from /cygdrive/c/ruby/lib/ruby/1.6/net/protocol.rb:201:in
`conn_socket'
from /cygdrive/c/ruby/lib/ruby/1.6/net/protocol.rb:190:in
`connect'
from /cygdrive/c/ruby/lib/ruby/1.6/net/protocol.rb:184:in `_start'
from /cygdrive/c/ruby/lib/ruby/1.6/net/protocol.rb:171:in `start'
from /cygdrive/c/ruby/lib/ruby/1.6/Net/Http.rb:500:in `get'
from Ruby2:3
from Ruby2:0
If I retry the operation enough times it eventually works ok. Has
anyone else seen this problem?
Thanks
S.Sykes