Bugs item #25816, was opened at 2009-05-07 04:42
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=25816&group_id=126

Category: `gem install` command
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Larry Kyrala (coldnebo)
Assigned to: Nobody (None)
Summary: misleading error message when one of many sources unreachable.

Initial Comment:
I puzzled over the following for about half an hour:

$ sudo gem install hoe
ERROR:  While executing gem ... (Zlib::GzipFile::Error)
    not in gzip format

Until I finally figured out that one of my sources (aka 'gem sources') was a 
address only accessible on my company's VPN. (I wasn't on the VPN at the time.) 
e.g:

$ gem sources
*** CURRENT SOURCES ***

http://gems.rubyforge.org/
http://rubygems.xxx.xxx/    <-- vpn address

This error was confusing, because I was attempting to get 'hoe' which is 
clearly at gems.rubyforge.org, however apparently gem attempts to ping ALL the 
sources, even if one isn't available, it croaks with this obscure error.

At least this should be documented.

At most, gem should return a meaningful error if one of the gem sources is 
unreachable.

Ideally, if the install name is found in one of the gem sources that IS 
available, it shouldn't matter, and should simply install the gem from the 
available source.

Other info:

using Mac OSX 10.5

Macports:
$ port installed | grep ruby
  rb-rubygems @1.3.1_0 (active)
  ruby @1.8.7-p72_2+thread_hooks
  ruby @1.8.7-p160_1+thread_hooks (active)
  ruby186 @1.8.6-p287_0+darwin_9+thread_hooks


Hope this helps! 
-lk


----------------------------------------------------------------------

Comment By: Nick Hildebrant (nihildeb)
Date: 2009-08-26 23:36

Message:
Proper error message is displayed on two linux boxes:

RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.1
  - RUBY VERSION: 1.8.5 (2006-08-25) [i386-linux]

RubyGems Environment:
  - RUBYGEMS VERSION: 1.3.3
  - RUBY VERSION: 1.8.7 (2009-06-12 patchlevel 174) [x86_64-linux]


ERROR:  http://gems.nosuchdomain.com does not appear to be a repository
ERROR:  could not find gem utility_belt locally or in a repository

Larry suggests: simply install the gem from the available source

If this is accepted, this should be a feature. As a bug, i can not reproduce. 







----------------------------------------------------------------------

Comment By: Larry Kyrala (coldnebo)
Date: 2009-05-07 04:43

Message:
BTW, I forgot to mention the workaround:

Simply remove the source that is unreachable and gem works fine.

----------------------------------------------------------------------

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=25816&group_id=126
_______________________________________________
Rubygems-developers mailing list
http://rubyforge.org/projects/rubygems
Rubygems-developers@rubyforge.org
http://rubyforge.org/mailman/listinfo/rubygems-developers

Reply via email to