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

Jeremy d jeremydeininger at gmail.com
Tue Dec 2 13:22:11 EST 2008

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:
=> 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 **

** snip example 2 **
Generated YAML master index: 187.241s
Generating specs index
ERROR:  While executing gem ... (NoMethodError)
    undefined method `empty?' for #<Gem::Platform:0xb5907044>
** end snip **

-------------- next part --------------
A non-text attachment was scrubbed...
Name: platform_empty_fix.diff
Type: application/octet-stream
Size: 915 bytes
Desc: not available
URL: <http://rubyforge.org/pipermail/rubygems-developers/attachments/20081202/76de5068/attachment.obj>

More information about the Rubygems-developers mailing list