Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Error while running gem update

Reply
Thread Tools

Error while running gem update

 
 
hweeboon@gmail.com
Guest
Posts: n/a
 
      05-02-2005
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

 
Reply With Quote
 
 
 
 
Assaph Mehr
Guest
Posts: n/a
 
      05-02-2005

(E-Mail Removed) 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.rubyforge.org/yaml
> 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/rubyg...ry/001381.html.

 
Reply With Quote
 
 
 
 
hweeboon@gmail.com
Guest
Posts: n/a
 
      05-03-2005
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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
gem list --remote --details gives "ERROR: While executing gem ...(NoMethodError)" Markus Fischer Ruby 4 03-27-2011 12:59 PM
ERROR: While executing gem ... (Gem::GemNotFoundException) C Lost Warrior Ruby 0 04-12-2008 03:50 PM
RubyGems 0.9.1 calling a gem with gem '<gem>' Austin 7873 Ruby 5 01-27-2007 10:05 PM
gem update for additional gem servers? Stephan Mueller Ruby 3 11-20-2006 06:15 PM
ERROR: While executing gem ... (Gem::GemNotFoundException) Could not find rubygems-upodate (> 0) in the repository han Ruby 1 10-24-2005 10:28 PM



Advertisments