[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Error while running gem update

hweeboon

5/2/2005 6:54:00 AM

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.rubyforg...
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

3 Answers

Assaph Mehr

5/2/2005 11:27:00 PM

0


hweeb...@gmail.com wrote:
> 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.rubyforg...
> with a browser (Safari). Does anyone know why? Thanks.

Are you sure you're not behind a proxy? I get good results on both
options.
In the past I've had the same problem where the corporate proxy was
mangling the head requests. Patching it to use #get worked, albeit
slower.
See
http://rubyforge.org/pipermail/rubygems-developers/2005-February/0....

hweeboon

5/3/2005 2:10:00 PM

0

Thanks for replying. If you mean changing from head to get solves the
problem, I've just tried it, nope. The thing is.. if I can view /yaml
from the browser (with no proxy set), why can't I do the same with
Net::HTTP? Is there any difference?

HweeBoon

John Wesley Asquith

5/19/2007 4:21:00 AM

0

:

>On Thu, 17 May 2007 06:37:00 +0000, wrote:
>

>>
>>> Falwell did much, much more.
>>
>> He was an insane political (but non-violent) anarchist. He lied, stole,
>> cheated, bribed, philandered, lied more, laundered money, gambled, and
>> lobbied for political reasons while using Christianity as an excuse and
>> a cover. He sought to alter the very Constitution of the United States
>> and destroy the Bill Of Rights through Christian activism in direct
>> opposition to the intent of those documents; and through fundamentalist
>> teachings he inspired bigotry, hate, predjudice, intolerance, and
>> continuously strived to separate mankind from any closeness with a
>> creator or any real truth about the forgiveness of Holy Spirit.
>>
>>
>> He was evil incarnate and spent his life stealing from and lying to the
>> earth's population.

Are you talking about Falwell or George W. Bush? I guess it doesn't
matter, they both were pretty much as you described.