Getting 'Bignum too big to conver into long( Range Error ) on bundle install

624 views
Skip to first unread message

Frank

unread,
Dec 14, 2010, 1:02:43 AM12/14/10
to ruby-bundler
I'm getting a "Bignum too big to conver into long( Range Error )"
error when I run "bundle install" on my staging server via a
capistrano recipe. My staging server is
Fedora 13 using Rails 2.3.5 and Bundler 1.0.7. Runing bundle install
causes bundler
to run for longer than I'm used to and then it crashes.

Here is the command that fails:

--------------CMD THAT FAILS-----------
cd /home/user/project/staging/releases/20101214054349 && bundle
install

------------ ERROR--------------
** [out :: staging.project.com] Fetching source index for http://rubygems.org/
*** [err :: staging.project.com] /usr/lib/ruby/site_ruby/1.8/rubygems/
requirement.rb:109:in `hash'
*** [err :: staging.project.com] :
*** [err :: staging.project.com] bignum too big to convert into `long'
*** [err :: staging.project.com] (
*** [err :: staging.project.com] RangeError
*** [err :: staging.project.com] )
*** [err :: staging.project.com] from /usr/lib/ruby/site_ruby/1.8/
rubygems/requirement.rb:109:in `hash'
*** [err :: staging.project.com] from /usr/lib/ruby/site_ruby/1.8/
rubygems/specification.rb:675:in `hash'
*** [err :: staging.project.com] from /usr/lib/ruby/1.8/fileutils.rb:
243:in `inject'
*** [err :: staging.project.com] from /usr/lib/ruby/site_ruby/1.8/
rubygems/specification.rb:674:in `each'
*** [err :: staging.project.com] from /usr/lib/ruby/site_ruby/1.8/
rubygems/specification.rb:674:in `inject'
*** [err :: staging.project.com] from /usr/lib/ruby/site_ruby/1.8/
rubygems/specification.rb:674:in `hash'
*** [err :: staging.project.com] from /usr/lib/ruby/1.8/tsort.rb:
181:in `include?'
*** [err :: staging.project.com] from /usr/lib/ruby/1.8/tsort.rb:
181:in `each_strongly_connected_component'
*** [err :: staging.project.com] ... 15 levels...
*** [err :: staging.project.com] from /usr/lib/ruby/gems/1.8/gems/
bundler-1.0.7/lib/bundler/vendor/thor/base.rb:389:in `start'
*** [err :: staging.project.com] from /usr/lib/ruby/gems/1.8/gems/
bundler-1.0.7/bin/bundle:13
*** [err :: staging.project.com] from /usr/bin/bundle:19:in `load'
*** [err :: staging.project.com] from /usr/bin/bundle:19
-----------------------------------------------------------------

Here is my Gem file

---------GEM FILE---------
source "http://rubygems.org"

gem 'acts-as-taggable-on'
gem 'authlogic'
gem 'bundler'
gem 'capistrano'
gem 'capybara', :group=>:test
gem 'cucumber', :group=>:test
gem 'cucumber-rails', :group=>:test
gem 'daemons', '1.0.10'
gem 'database_cleaner', :group=>:test
gem 'delayed_job'
gem 'easy_roles'
gem 'factory_girl', :group=>[:test, :cucumber]
gem 'highlight'
gem 'mysql'
gem 'nifty-generators', :group=>:development
gem 'paperclip'
gem 'rack'
gem 'rails', '2.3.5'
gem 'rspec', '1.3.1', :group=>:test
gem 'rspec-rails'
gem 'ruby-debug', '0.10.3'
gem 'selenium-client', :group=>:test
gem 'sqlite3-ruby', :group=>[:development, :test]
gem 'test-unit', '1.2.3', :group=>:test
gem 'ZenTest'
--------------------------------------

I wonder if any one has seen something similar or what kinds of things
might cause this? I also wonder if my issue may be related to this
link:

http://groups.google.com/group/ruby-bundler/browse_thread/thread/83446b8019a59408/f0bdfce107d94cb2?lnk=gst&q=infinite#f0bdfce107d94cb2

Frank

unread,
Dec 14, 2010, 10:50:24 AM12/14/10
to ruby-bundler
Trying to troubleshoot this issue I've removed ruby-debug from my
Gemfile, since I noticed, with DEBUG_RESOLVER=true that the crash
would occur when attempting to resolve linecache.

However I still get the RangeError.

------------OUTPUT-------------
......
Requirements:
*** [err :: staging.projects.ws] ffi (~> 0.6.3)
*** [err :: staging.projects.ws]
*** [err :: staging.projects.ws] Attempting:
*** [err :: staging.projects.ws] ffi (~> 0.6.3)
*** [err :: staging.projects.ws]
*** [err :: staging.projects.ws] * [SUCCESS] Already activated
*** [err :: staging.projects.ws]
*** [err :: staging.projects.ws] /usr/lib/ruby/site_ruby/1.8/rubygems/
requirement.rb:109:in `hash'
*** [err :: staging.projects.ws] :
*** [err :: staging.projects.ws] bignum too big to convert into `long'
*** [err :: staging.projects.ws] (
*** [err :: staging.projects.ws] RangeError
*** [err :: staging.projects.ws] )
*** [err :: staging.projects.ws] from /usr/lib/ruby/site_ruby/1.8/
rubygems/requirement.rb:109:in `hash'
*** [err :: staging.projects.ws] from /usr/lib/ruby/site_ruby/1.8/
rubygems/specification.rb:675:in `hash'
*** [err :: staging.projects.ws] from /usr/lib/ruby/1.8/fileutils.rb:
243:in `inject'
*** [err :: staging.projects.ws] from /usr/lib/ruby/site_ruby/1.8/
rubygems/specification.rb:674:in `each'
*** [err :: staging.projects.ws] from /usr/lib/ruby/site_ruby/1.8/
rubygems/specification.rb:674:in `inject'
*** [err :: staging.projects.ws] from /usr/lib/ruby/site_ruby/1.8/
rubygems/specification.rb:674:in `hash'
*** [err :: staging.projects.ws] from /usr/lib/ruby/1.8/tsort.rb:
181:in `include?'
*** [err :: staging.projects.ws] from /usr/lib/ruby/1.8/tsort.rb:
181:in `each_strongly_connected_component'
*** [err :: staging.projects.ws] ... 15 levels...
*** [err :: staging.projects.ws] from /usr/lib/ruby/gems/1.8/gems/
bundler-1.0.7/lib/bundler/vendor/thor/base.rb:389:in `start'
*** [err :: staging.projects.ws] from /usr/lib/ruby/gems/1.8/gems/
bundler-1.0.7/bin/bundle:13
*** [err :: staging.projects.ws] from /usr/bin/bundle:19:in `load'
*** [err :: staging.projects.ws] from /usr/bin/bundle:19
----------------------------

Note that it seems to crash after activating ffi.


On Dec 14, 12:02 am, Frank <francisco.li...@gmail.com> wrote:
> I'm getting a  "Bignum too big to conver into long( Range Error )"
> error when I run "bundle install" on my staging server via a
> capistrano recipe. My staging server is
> Fedora 13 using Rails 2.3.5 and Bundler 1.0.7.  Runing bundle install
> causes bundler
> to run for longer than I'm used to and then it crashes.
>
> Here is the command that fails:
>
> --------------CMD THAT FAILS-----------
> cd /home/user/project/staging/releases/20101214054349 && bundle
> install
>
> ------------ ERROR--------------
> ** [out :: staging.project.com] Fetching source index forhttp://rubygems.org/
> http://groups.google.com/group/ruby-bundler/browse_thread/thread/8344...

Frank

unread,
Dec 14, 2010, 12:01:00 PM12/14/10
to ruby-bundler
I found the problem.

My Fedroa 13 server had a system ruby installation. Bundler was using
an old version of ruby gems that includes the bug I encountered.

The solution was to uninstall the system ruby installation and
configure bundler to use the REE installation on the server.

andyl

unread,
Dec 16, 2010, 11:16:39 AM12/16/10
to ruby-bundler
I also ran into this problem, and had to remove gems one by one until
I found the one that bundler couldn't handle.

Andre Arko

unread,
Dec 16, 2010, 1:45:25 PM12/16/10
to ruby-b...@googlegroups.com
On Dec 16, 2010, at 8:16 AM, andyl wrote:
>
> I also ran into this problem, and had to remove gems one by one until
> I found the one that bundler couldn't handle.
>
> On Dec 14, 9:01 am, Frank <francisco.li...@gmail.com> wrote:
>> I found the problem.
>>
>> My Fedroa 13 server had a system ruby installation. Bundler was using
>> an old version of ruby gems that includes the bug I encountered.
>>
>> The solution was to uninstall the system ruby installation and
>> configure bundler to use the REE installation on the server.

As Frank reported, this is a bug in ruby/rubygems, not Bundler. Please update your rubygems version or your ruby version to fix it.

— Andre

andyl

unread,
Dec 16, 2010, 8:14:12 PM12/16/10
to ruby-bundler
> this is a bug in ruby/rubygems, not Bundler. Please update your rubygems version or your ruby version to fix it.

I'm using Gems 1.3.7 and Ruby 1.8.7. What version should I use to
avoid the bug?

- Andy

Frank Licea

unread,
Dec 17, 2010, 7:27:15 PM12/17/10
to ruby-b...@googlegroups.com
You have to be careful to find out exactly version of Gems and Ruby could possibly be running when bundler starts. It is possible you have more than one version installed on your machine. 

Here is what happened in my case:

My  .bash_profile is configured to use Ruby Enterprise Edition. However when I attempted to deploy my web app with Capistrano I encountered the error I described earlier. 

The reason is the Capistrano doesn't load my .bash_profile when deploying my application. Well, it didn't at the time. When the command `bundle install` ran, the older system installation of Ruby and RubyGems were used.

Try using the `whereis gem` or `whereis ruby` command to find out what gems or ruby you have on your path. 



--
You received this message because you are subscribed to the Google Groups "ruby-bundler" group.
To post to this group, send email to ruby-b...@googlegroups.com.
To unsubscribe from this group, send email to ruby-bundler...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ruby-bundler?hl=en.


twiggle

unread,
Dec 21, 2010, 5:41:13 AM12/21/10
to ruby-bundler
I'm running REE 1.8.7, with rubygems 1.3.7 on Centos 5.2.

Getting the same error when capistrano attempts bundle install, and in
my case, confiatron seems to by the gem that fails.

There is a earlier version of rails installed, but I don't think
that's the problem.

Is it possible to unpack the gems into vendor/gems, not include them
in bundle install and have them still recognized?
> > ruby-bundler...@googlegroups.com<ruby-bundler%2Bunsubscribe@google groups.com>
> > .
Reply all
Reply to author
Forward
0 new messages