在rails应用程序中安装bundle时出错

时间:2010-11-28 02:38:41

标签: ruby-on-rails bundle bundler

我正在尝试按照我的应用程序中的建议安装捆绑包。但我得到以下错误

      $sudo bundle install  --local

     /usr/local/lib/site_ruby/1.8/rubygems/requirement.rb:109:in `hash': bignum too big to convert into `long' (RangeError)
from /usr/local/lib/site_ruby/1.8/rubygems/requirement.rb:109:in `hash'
from /usr/local/lib/site_ruby/1.8/rubygems/specification.rb:675:in `hash'
from /usr/lib/ruby/1.8/open-uri.rb:32:in `inject'
from /usr/local/lib/site_ruby/1.8/rubygems/specification.rb:674:in `each'
from /usr/local/lib/site_ruby/1.8/rubygems/specification.rb:674:in `inject'
from /usr/local/lib/site_ruby/1.8/rubygems/specification.rb:674:in `hash'
from /usr/lib/ruby/1.8/tsort.rb:181:in `include?'
from /usr/lib/ruby/1.8/tsort.rb:181:in `each_strongly_connected_component'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/spec_set.rb:124:in `tsort_each_node'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/spec_set.rb:124:in `each'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/spec_set.rb:124:in `tsort_each_node'
from /usr/lib/ruby/1.8/tsort.rb:180:in `each_strongly_connected_component'
from /usr/lib/ruby/1.8/tsort.rb:148:in `tsort_each'
from /usr/lib/ruby/1.8/tsort.rb:135:in `tsort'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/spec_set.rb:107:in `sorted'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/spec_set.rb:12:in `each'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/installer.rb:44:in `run'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/installer.rb:8:in `install'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/cli.rb:221:in `install'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor/task.rb:22:in `send'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor/task.rb:22:in `run'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor.rb:246:in `dispatch'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.3/lib/bundler/vendor/thor/base.rb:389:in `start'
from /usr/lib/ruby/gems/1.8/gems/bundler-1.0.3/bin/bundle:13
from /usr/bin/bundle:19:in `load'
from /usr/bin/bundle:19

为什么我得到这个错误如何解决这个?

MY GEMFILE是

source :gemcutter

gem "rails", "~>2.3.10"
gem "rack", "~>1.1.0"
gem "hpricot", "~>0.8.3"
gem "htmldoc", ">=0.2.3"
gem "babosa"
gem "thinking-sphinx", ">= 1.3.20", :require => "thinking_sphinx"
gem "ts-delayed-delta", ">= 1.1.0", :require => "thinking_sphinx/deltas/delayed_delta"

#应删除这些

gem "oauth"
gem "oauth-plugin"
# gem "mini_magick
 gem "coderay"

# Needed only when LDAP connectivity is needed
 # gem "net-ldap"

 # Just for avoiding Webrick
 gem "mongrel"

 # For simplicity install this using as it needs architecture of your system
 # sudo env ARCHFLAGS="-arch x86_64" gem install mysql -- --with-mysql-config=/path /to/mysql_config
      gem "mysql"

1 个答案:

答案 0 :(得分:5)

你需要升级到ruby-1.8.7-p248至少要有保证来修复它(升级rubygems不起作用)。

有关http://revision-zero.org/history-of-a-bug

的更多详情