为什么我在使用Heroku的现有项目中收到此捆绑包错误?

时间:2012-06-01 19:08:21

标签: ruby-on-rails heroku bundler

在几乎任何佣金任务期间都会发生此错误:

project/Gemfile:4:in `evaluate': undefined method `ruby' for #<Bundler::Dsl:0x007f8274ba6ac8> (NoMethodError)
~/.rvm/gems/ruby-1.9.3-p0-perf/gems/bundler-1.1.4/lib/bundler/dsl.rb:7:in `instance_eval'
~/.rvm/gems/ruby-1.9.3-p0-perf/gems/bundler-1.1.4/lib/bundler/dsl.rb:7:in `evaluate'
~/.rvm/gems/ruby-1.9.3-p0-perf/gems/bundler-1.1.4/lib/bundler/definition.rb:18:in `build'
~/.rvm/gems/ruby-1.9.3-p0-perf/gems/bundler-1.1.4/lib/bundler.rb:135:in `definition'
~/.rvm/gems/ruby-1.9.3-p0-perf/gems/bundler-1.1.4/lib/bundler/cli.rb:220:in `install'
~/.rvm/gems/ruby-1.9.3-p0-perf/gems/bundler-1.1.4/lib/bundler/vendor/thor/task.rb:22:in `run'
.rvm/gems/ruby-1.9.3-p0-perf/gems/bundler-1.1.4/lib/bundler/vendor/thor/invocation.rb:118:in `invoke_task'

的Gemfile:4

  ruby '1.9.3'

1 个答案:

答案 0 :(得分:15)

在Heroku上运行多个版本的ruby需要此行,但目前需要预先发布的bundler版本才能在本地运行。

gem install bundler --pre

请参阅http://blog.heroku.com/archives/2012/5/9/multiple_ruby_version_support_on_heroku/