Hi all,
I am trying to run some of the Net::HTTP similar to the PickAxe book as
below
require 'net/http'
h = Net::HTTP.new( 'www.pragmaticprogrammer.com', 80 )
resp, data = h.get2( '/index/html', nil )
puts resp.code
However all I ever get with this (and all the other Net protocol examples)
is the following:
/cygdrive/d/ruby/lib/ruby/1.6/net/protocol.rb:427:in `new': errno EALREADY
triggered - "connect(2)"(Errno::EALREADY)
from /cygdrive/d/ruby/lib/ruby/1.6/net/protocol.rb:427:in `new'
from /cygdrive/d/ruby/lib/ruby/1.6/net/protocol.rb:427:in `initialize'
from /cygdrive/d/ruby/lib/ruby/1.6/net/protocol.rb:174:in `new'
from /cygdrive/d/ruby/lib/ruby/1.6/net/protocol.rb:174:in `connect'
from /cygdrive/d/ruby/lib/ruby/1.6/net/protocol.rb:135:in `start'
from /cygdrive/d/ruby/lib/ruby/1.6/net/http.rb:459:in `connecting'
from /cygdrive/d/ruby/lib/ruby/1.6/net/http.rb:439:in `common_oper'
from /cygdrive/d/ruby/lib/ruby/1.6/net/http.rb:376:in `get2'
from Ruby1:4
from Ruby1:0
Any ideas what my problem may be?
I am connected to the internet via a home network and cable modem (from
Telstra Australia).
TIA
Ross