【发布时间】:2013-05-01 18:28:11
【问题描述】:
我正在尝试将 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 堆栈上。
【问题讨论】:
-
日志显示
Fetching custom git buildpack- 看起来您正在使用自定义构建包,这可能解释了为什么使用旧版本的 Bundler。heroku config:get BUILDPACK_URL有什么显示吗? -
你是对的。将其发布为答案,我将其标记为正确。