[Rubygems-developers] [ rubygems-Bugs-27292 ] Empty gem file prevents installation

noreply at rubyforge.org noreply at rubyforge.org
Mon Feb 8 22:30:58 EST 2010


Bugs item #27292, was opened at 2009-10-14 14:40
You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=27292&group_id=126

Category: `gem install` command
Group: v1.3.x
>Status: Closed
>Resolution: Accepted
Priority: 3
Submitted By: Ian Ragsdale (iragsdale)
>Assigned to: Eric Hodel (drbrain)
Summary: Empty gem file prevents installation

Initial Comment:
I'm not sure how but there was an empty file in the gem cache on my system.  When the gem installer tried to figure out the file format, it crashed on line 45 of format.rb:

    if File.read(file_path, 20).include?("MD5SUM =")

If the file is empty, then file.read returns nil, and the install fails.  It would be better to trap this error and give a more useful error message, so that I don't have to modify the source to figure out why the gem won't install.  

This is probably low priority because most users will never hit it, but I thought I'd submit it anyway.

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

>Comment By: Eric Hodel (drbrain)
Date: 2010-02-08 19:30

Message:
Fixed.

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

You can respond by visiting: 
http://rubyforge.org/tracker/?func=detail&atid=575&aid=27292&group_id=126


More information about the Rubygems-developers mailing list