This help site has been deprecated. Please send your requests to email@example.com
RangeError when running gem generate_index
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
Generating Marshal quick index gemspecs for 105 gems
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:
ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]
This is on Windows Server 2003 R2, SP1.
Discussions are closed to public comments.
If you need help with RubyGems.org please start a new discussion.
|?||Show this help|
|ESC||Blurs the current field|
|r||Focus the comment reply box|
|^ + ↩||Submit the comment|
You can use
Command ⌘ instead of
Control ^ on Mac
Support Staff 1 Posted by Nick Quaranto on 01 Dec, 2010 04:42 AM
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 Posted by Alan Baird on 01 Dec, 2010 05:20 AM
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
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.
3 Posted by Alan Baird on 01 Dec, 2010 05:39 AM
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.
4 Posted by Alan Baird on 01 Dec, 2010 06:11 AM
Heck, I'm up, I might as well finish... :)
So, by process of elimination, these gems all seem to cause the RangeError:
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. :)
5 Posted by Jiří Kubíček on 02 Dec, 2010 10:48 PM
same problem here:
ruby 1.8.7 (2009-04-08 patchlevel 160) [i386-freebsd8]
6 Posted by blambeau on 01 Mar, 2011 06:58 PM
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
Support Staff 7 Posted by Nick Quaranto on 27 May, 2011 12:28 AM
Fun times! So please upgrade to
ruby-1.8.7-p248to do this. Use RVM to make this easy!
Closing this out since it seems fixed.
Nick Quaranto closed this discussion on 27 May, 2011 12:28 AM.