tag:help.rubygems.org,2010-01-19:/discussions/problems/418-rangeerror-when-running-gem-generate_indexRubyGems.org: Discussion 2011-05-27T00:28:33Ztag:help.rubygems.org,2010-01-19:Comment/40446332010-11-30T18:32:47Z2010-11-30T18:32:48ZRangeError when running gem generate_index<div><p>I'm trying to follow the directions at: <a href=
"http://rambleon.org/2008/08/01/creating-your-own-gem-server-redux/">
http://rambleon.org/2008/08/01/creating-your-own-gem-server-redux/</a>
for setting up a local gemserver. I am running the command 'gem
generate_index' and I get the following message:</p>
<p>Loaded all gems<br>
loaded: 4.093s<br>
Generating Marshal quick index gemspecs for 105 gems<br>
.........................................................................................................
Complete<br>
Generated Marshal quick index gemspecs: 0.969s<br>
Generating YAML quick index gemspecs for 105 gems<br>
.............ERROR: While executing gem ... (RangeError)</p>
<pre>
<code>bignum too big to convert into `long'</code>
</pre>
<p>I saw a post here: <a href=
"http://help.rubygems.org/discussions/problems/335-marshal48z-still-not-updating-completely-as-of-21-september">
http://help.rubygems.org/discussions/problems/335-marshal48z-still-...</a>
which seemed to be the same problem, but it seemed that the problem
should have self corrected (??). I am running the following:</p>
<p>C:\www\rubygems>ruby -v<br>
ruby 1.8.6 (2008-08-11 patchlevel 287) [i386-mswin32]</p>
<p>C:\www\rubygems>gem -v<br>
1.3.7</p>
<p>This is on Windows Server 2003 R2, SP1.</p>
<p>Thanks, Alan</p></div>Alan Bairdtag:help.rubygems.org,2010-01-19:Comment/40446332010-12-01T04:42:51Z2010-12-01T04:42:51ZRangeError when running gem generate_index<div><p>Hi there,</p>
<p>Just curious, does that happen on a newer version of Ruby too?
<a href="http://rubyinstaller.org">http://rubyinstaller.org</a> can
hook you up with a more updated version.</p></div>Nick Quarantotag:help.rubygems.org,2010-01-19:Comment/40446332010-12-01T05:20:45Z2010-12-01T05:20:46ZRangeError when running gem generate_index<div><p>Nick -</p>
<p>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:</p>
<p>ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]<br>
ruby 1.8.6 (2010-02-04 patchlevel 398) [i386-mingw32]<br>
ruby 1.8.7 (2010-08-16 patchlevel 302) [i386-mingw32]</p>
<p>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:</p>
<p>Loading 115 gems from .<br>
.....................WARNING: Skipping misnamed gem:
./gems/fastthread-1.0.1-x86-mswin32.gem should be named fastthread
n32 (fastthread-1.0.1-i386-mswin32)<br>
............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)<br>
WARNING: Skipping misnamed gem:
./gems/hpricot-0.8.3-x86-mswin32.gem should be named
hpricot-0.8.3-x86-mswin32 (hpricot<br>
in32)</p>
<p>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?</p>
<p>If you have anything else I could try I would appreciate
suggestions. Thanks for your help.</p>
<p>Alan</p></div>Alan Bairdtag:help.rubygems.org,2010-01-19:Comment/40446332010-12-01T05:39:34Z2010-12-01T05:39:36ZRangeError when running gem generate_index<div><p>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.</p>
<p>In the meantime, if you have a fix for the "misnamed gem"
warning, I'd like to know how to fix it.</p>
<p>Thanks!,<br>
Alan</p></div>Alan Bairdtag:help.rubygems.org,2010-01-19:Comment/40446332010-12-01T06:11:08Z2010-12-01T06:11:11ZRangeError when running gem generate_index<div><p>Heck, I'm up, I might as well finish... :)</p>
<p>So, by process of elimination, these gems all seem to cause the
RangeError:</p>
<p>RedCloth-4.2.3-x86-mswin32-60.gem<br>
rspec-2.2.0.gem<br>
rspec-core-2.2.1.gem<br>
rspec-expectations-2.2.0.gem<br>
rspec-mocks-2.2.0.gem</p>
<p>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.</p>
<p>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.</p>
<p>Now I really am stuck and going to bed. :)</p>
<p>Alan</p></div>Alan Bairdtag:help.rubygems.org,2010-01-19:Comment/40446332010-12-02T22:48:33Z2010-12-02T22:48:34ZRangeError when running gem generate_index<div><p>Hello,</p>
<p>same problem here:<br>
FreeBSD 8.1-RELEASE<br>
ruby 1.8.7 (2009-04-08 patchlevel 160) [i386-freebsd8]<br>
gem 1.3.7</p></div>Jiří Kubíčektag:help.rubygems.org,2010-01-19:Comment/40446332011-03-01T18:58:57Z2011-03-01T18:58:57ZRangeError when running gem generate_index<div><p>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).</p>
<p>More details on <a href=
"http://revision-zero.org/history-of-a-bug">http://revision-zero.org/history-of-a-bug</a></p></div>blambeautag:help.rubygems.org,2010-01-19:Comment/40446332011-05-27T00:28:28Z2011-05-27T00:28:28ZRangeError when running gem generate_index<div><p>Fun times! So please upgrade to <code>ruby-1.8.7-p248</code> to
do this. Use RVM to make this easy!</p>
<p><a href=
"https://rvm.beginrescueend.com/">https://rvm.beginrescueend.com/</a></p>
<p>Closing this out since it seems fixed.</p></div>Nick Quaranto