[Rubygems-developers] gem generate error undefined method empty? for Gem::Platform

Eric Hodel drbrain at segment7.net
Tue Dec 2 17:16:44 EST 2008

On Dec 2, 2008, at 10:22 AM, Jeremy d wrote:

> Hi guys,
> I'm involved in helping run a gem mirror for rightscale.com and we are
> upgrading the indexes to the new 1.2+ format.  When using rubygems
> 1.3.x (tried 0 and 1 and even svn) I get the following fatal error
> when generating the index.  This happens in various places (not the
> same place in each version).
> My main question is: do you know what version of gem rubyforge is
> using to generate their indexes or do you recommend a specific version
> to do so?  Right now using rubygems version 1.2.0 to generate the
> indexes successfully completes with no errors and I'm leaning toward
> using that version.
> After looking at the indexer code and test, it seemed that using .to_s
> might be what is expected to cover this case, so I'm attaching the
> diff so you can see what I mean.
> ** snip example 1**
> WARNING:  Skipping misnamed gem:
> /mnt/mirror/releases/200811260020/gems/zipruby-0.2.9-x86-mswin32.gem
> => zipruby-0.2.9-x86-mswin32 (zipruby-0.2.9-mswin32)
> ERROR:  While executing gem ... (NoMethodError)
>    undefined method `empty?' for #<Gem::Platform:0xeaa379c>
> ** end snip **

Your diff fixes the symptom of the problem, but not the cause.  Please  

ruby -Ilib bin/gem --debug generate_index -V --modern -d /path/to/ 

with this patch to trunk:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: indexer.debug.diff
Type: application/octet-stream
Size: 548 bytes
Desc: not available
URL: <http://rubyforge.org/pipermail/rubygems-developers/attachments/20081202/72a197dd/attachment-0001.obj>
-------------- next part --------------

More information about the Rubygems-developers mailing list