This help site has been deprecated. Please send your requests to support@rubygems.org

RangeError when running gem generate_index

Alan Baird's Avatar

Alan Baird

30 Nov, 2010 06:32 PM

I'm trying to follow the directions at: http://rambleon.org/2008/08/01/creating-your-own-gem-server-redux/ for setting up a local gemserver. I am running the command 'gem generate_index' and I get the following message:

Loaded all gems
loaded: 4.093s
Generating Marshal quick index gemspecs for 105 gems
......................................................................................................... Complete
Generated Marshal quick index gemspecs: 0.969s
Generating YAML quick index gemspecs for 105 gems
.............ERROR: While executing gem ... (RangeError)

bignum too big to convert into `long'

I saw a post here: http://help.rubygems.org/discussions/problems/335-marshal48z-still-... which seemed to be the same problem, but it seemed that the problem should have self corrected (??). I am running the following:

C:\www\rubygems>ruby -v
ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]

C:\www\rubygems>gem -v
1.3.7

This is on Windows Server 2003 R2, SP1.

Thanks, Alan

  1. Support Staff 1 Posted by Nick Quaranto on 01 Dec, 2010 04:42 AM

    Nick Quaranto's Avatar

    Hi there,

    Just curious, does that happen on a newer version of Ruby too? http://rubyinstaller.org can hook you up with a more updated version.

  2. 2 Posted by Alan Baird on 01 Dec, 2010 05:20 AM

    Alan Baird's Avatar

    Nick -

    Oddly enough, I tried some other versions of Ruby on my Win7 machine at home and was able to complete the generate_index successfully on two versions of 1.8.6 and one version of 1.8.7:

    ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]
    ruby 1.8.6 (2010-02-04 patchlevel 398) [i386-mingw32]
    ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32]

    Not sure what to make of that. I don't have the specific version at home that I have at work, but I don't know that this would matter? The only thing I can think of is that when I ran the command at work, I got a lot of the following warnings:

    Loading 115 gems from .
    .....................WARNING: Skipping misnamed gem: ./gems/fastthread-1.0.1-x86-mswin32.gem should be named fastthread n32 (fastthread-1.0.1-i386-mswin32)
    ............WARNING: Skipping misnamed gem: ./gems/hpricot-0.6.164-x86-mswin32.gem should be named hpricot-0.6.164-x86- t-0.6.164-mswin32)
    WARNING: Skipping misnamed gem: ./gems/hpricot-0.8.3-x86-mswin32.gem should be named hpricot-0.8.3-x86-mswin32 (hpricot
    in32)

    I didn't put them in the original post because I didn't think that warnings were important. Do you think this is causing a problem and if so, how do I fix it?

    If you have anything else I could try I would appreciate suggestions. Thanks for your help.

    Alan

  3. 3 Posted by Alan Baird on 01 Dec, 2010 05:39 AM

    Alan Baird's Avatar

    Actually, I figured out some things to try. I started with just 10 gems and was able to execute the generate_index command successfully. I have added about 40+ gems (even those with the name warnings) with no problems. I guess I will try to add the rest of them tomorrow and see if there is a problem gem somewhere that is causing the error.

    In the meantime, if you have a fix for the "misnamed gem" warning, I'd like to know how to fix it.

    Thanks!,
    Alan

  4. 4 Posted by Alan Baird on 01 Dec, 2010 06:11 AM

    Alan Baird's Avatar

    Heck, I'm up, I might as well finish... :)

    So, by process of elimination, these gems all seem to cause the RangeError:

    RedCloth-4.2.3-x86-mswin32-60.gem
    rspec-2.2.0.gem
    rspec-core-2.2.1.gem
    rspec-expectations-2.2.0.gem
    rspec-mocks-2.2.0.gem

    So, I decided to go back and get a new gem just to see if that would work. My normal method of getting gems is to do a gem install and then get the .gem file from the cache. But, on running "gem install rspec", I get the same RangeError, so that seems like the culprit.

    Unfortunately, when I try to reproduce the problem at home, I have no trouble installing rspec on any one of my 3 versions of Ruby.

    Now I really am stuck and going to bed. :)

    Alan

  5. 5 Posted by Jiří Kubíček on 02 Dec, 2010 10:48 PM

    Jiří Kubíček's Avatar

    Hello,

    same problem here:
    FreeBSD 8.1-RELEASE
    ruby 1.8.7 (2009-04-08 patchlevel 160) [i386-freebsd8]
    gem 1.3.7

  6. 6 Posted by blambeau on 01 Mar, 2011 06:58 PM

    blambeau's Avatar

    I've tracked this bug the whole day. You need to upgrade to ruby-1.8.7-p248 at least to have a guarantee to fix it (upgrading rubygems won't work so far).

    More details on http://revision-zero.org/history-of-a-bug

  7. Support Staff 7 Posted by Nick Quaranto on 27 May, 2011 12:28 AM

    Nick Quaranto's Avatar

    Fun times! So please upgrade to ruby-1.8.7-p248 to do this. Use RVM to make this easy!

    https://rvm.beginrescueend.com/

    Closing this out since it seems fixed.

  8. Nick Quaranto closed this discussion on 27 May, 2011 12:28 AM.

Discussions are closed to public comments.
If you need help with RubyGems.org please start a new discussion.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac