H
hweeboon
I've just installed Ruby 1.8.2 on Mac OS X Panther, followed by RubyGem
0.8.10.1. When I try to run "gem update" or "sudo gem update" I get the
following error:
===========
ERROR: While executing gem ... (Errno::ECONNRESET)
Connection reset by peer
===========
I re-ran it and with the option --backtrace* and traced the offending
lines to:
===========
def read_size(uri)
require 'net/http'
require 'uri'
u = URI.parse(uri)
http = connect_to(u.host, u.port)
path = (u.path == "") ? "/" : u.path
resp = http.head(path)
===========
Now I start up irb and run
===========
h = Net::HTTP.new("gems.rubyforge.org", 80)
r=h.head('/yaml')
===========
I get the same error as above. And if I run the following, I get a good
response:
===========
h = Net::HTTP.new("motionobj.com", 80)
r=h.head('/index.htm')
===========
I'm not behind a proxy and I can access http://gems.rubyforge.org/yaml
with a browser (Safari). Does anyone know why? Thanks.
* why are the options specified at the end of the line instead of after
the command? Took me a while to realise that...
HweeBoon
0.8.10.1. When I try to run "gem update" or "sudo gem update" I get the
following error:
===========
ERROR: While executing gem ... (Errno::ECONNRESET)
Connection reset by peer
===========
I re-ran it and with the option --backtrace* and traced the offending
lines to:
===========
def read_size(uri)
require 'net/http'
require 'uri'
u = URI.parse(uri)
http = connect_to(u.host, u.port)
path = (u.path == "") ? "/" : u.path
resp = http.head(path)
===========
Now I start up irb and run
===========
h = Net::HTTP.new("gems.rubyforge.org", 80)
r=h.head('/yaml')
===========
I get the same error as above. And if I run the following, I get a good
response:
===========
h = Net::HTTP.new("motionobj.com", 80)
r=h.head('/index.htm')
===========
I'm not behind a proxy and I can access http://gems.rubyforge.org/yaml
with a browser (Safari). Does anyone know why? Thanks.
* why are the options specified at the end of the line instead of after
the command? Took me a while to realise that...
HweeBoon