Bugs item #29168, was opened at 2011-05-05 16:46
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=29168&group_id=126

Category: None
Group: None
Status: Open
Resolution: None
Priority: 3
Submitted By: Bala Paranj (bparanj)
Assigned to: Nobody (None)
Summary: gem install <gem_name> gives vague error when not connected to network

Initial Comment:
Example:

$ gem install heroku
ERROR:  http://gems.rubyforge.org/ does not appear to be a repository
ERROR:  Could not find a valid gem 'heroku' (>= 0) in any repository

Here is the code that can be used in the patch to handle different scenarios to 
give user useful feedback to recover from error:

 rescue SocketError => serror
   puts "You are not connected to the network."
 rescue Errno::ECONNREFUSED => cerror
   puts "Server is down"
 rescue => e
   puts "Exception #{e.message} occurred"
 end

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

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=29168&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