我正在尝试将 Rack 应用程序部署到 heroku,但在捆绑步骤中失败:
-----> Fetching custom git buildpack... done
-----> Ruby/Rack app detected
-----> Using RUBY_VERSION: ruby-1.9.3-p0
-----> Installing dependencies using Bundler version 1.1.rc.7
Running: bundle install --without development:test --path vendor/bundle --binstubs bin/ --deployment
/tmp/build_158s9o0ec0gdk/Gemfile:2:in `evaluate': undefined method `ruby' for #<Bundler::Dsl:0x00000001c7c418> (NoMethodError)
(...)
/app/bin/bundle:23:in `load'
/app/bin/bundle:23:in `<main>'
There was an error in your Gemfile, and Bundler cannot continue.
!
! Failed to install gems via Bundler.
!
! Heroku push rejected, failed to compile Ruby/rack app
失败是undefined method 'ruby' for #<Bundler::Dsl:0x00000001c7c418> (NoMethodError)
这来自我的 Gemfile
source 'https://rubygems.org'
ruby '2.0.0'
我认为这是由于该方法直到 1.2 版才添加到 Bundler 中,而 heroku 似乎使用的是 1.1.rc.7 版。
我不知道如何升级捆绑器的 heroku 版本。我已经在 Cedar 堆栈上。