如何在heroku上升级系统宝石?

时间:2011-03-08 17:49:04

标签: ruby-on-rails heroku

我正在使用heroku bamboo-mri-1.9.2堆栈并在我推送到heroku时收到以下消息:我很难过:

  Installing hoe (2.9.1) /usr/ruby1.9.2/lib/ruby/1.9.1/rubygems/installer.rb:170:in `install': hoe requires RubyGems version >= 1.4. Try 'gem update --system' to update RubyGems itself. (Gem::InstallError)
    from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/source.rb:95:in `install'
    from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/installer.rb:55:in `block in run'
    from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `block in each'
    from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `each'
    from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/spec_set.rb:12:in `each'
    from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/installer.rb:44:in `run'
    from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/installer.rb:8:in `install'
    from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/cli.rb:225:in `install'
    from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/vendor/thor/task.rb:22:in `run'
    from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'
    from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/vendor/thor.rb:246:in `dispatch'
    from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/lib/bundler/vendor/thor/base.rb:389:in `start'
    from /usr/ruby1.9.2/lib/ruby/gems/1.9.1/gems/bundler-1.0.7/bin/bundle:13:in `<top (required)>'
    from /usr/ruby1.9.2/bin/bundle:19:in `load'
    from /usr/ruby1.9.2/bin/bundle:19:in `<main>'
   FAILED: http://docs.heroku.com/bundler

任何想法?提前谢谢。

2 个答案:

答案 0 :(得分:0)

我会从你发送到github的内容中排除'hoe'宝石。

group :test, :development do
  gem "hoe"
  # other gems you want to exclude from github
end

然后设置你的heroku变量:

heroku config:add BUNDLE_WITHOUT="development:test"

阅读更多:http://devcenter.heroku.com/articles/bundler

答案 1 :(得分:0)

尝试使用不同版本的方式:

hoe 2.10.0 
hoe 2.9.6 
hoe 2.9.5 
hoe 2.9.4 
hoe 2.9.3 

一次添加一个,捆绑,然后推送到heroku。