【发布时间】:2012-07-11 19:04:50
【问题描述】:
我正在与 ssh 密钥搏斗并上传了一个新密钥,然后我 git push heroku 掌握得很好,然后它显示了我的登录页面,但显示了
We're sorry, but something went wrong.
我在stackoverflow中发现可能是我还没跑
heroku rake db:migrate
(没有标准文档说要这样做!)但是当我运行它时,我得到了这个:
User/<computername>/.heroku/client/lib/heroku/cli.rb:30:in `start': undefined method `error_with_failure'
for Heroku::Helpers:Module (NoMethodError)from /usr/bin/heroku:28
此文件的代码如下所示:
def self.start(*args)
begin
if $stdin.isatty
$stdin.sync = true
end
if $stdout.isatty
$stdout.sync = true
end
command = args.shift.strip rescue "help"
Heroku::Command.load
Heroku::Command.run(command, args)
rescue Interrupt
`stty icanon echo`
error("Command cancelled.")
rescue => error
if Heroku::Helpers.error_with_failure <<<<<<<<< Line #30 WHERE ERROR OCCURS
display("failed")
Heroku::Helpers.error_with_failure = false
end
$stderr.puts(' ! Heroku client internal error.')
$stderr.puts(" ! Search for help at: https://help.heroku.com")
$stderr.puts(" ! Or report a bug at: https://github.com/heroku/heroku/issues/new")
$stderr.puts
$stderr.puts(" Error: #{error.message} (#{error.class})")
$stderr.puts(" Backtrace: #{error.backtrace.first}")
error.backtrace[1..-1].each do |line|
$stderr.puts(" #{line}")
end
【问题讨论】:
-
你在使用 cedar 堆栈吗?如果是这样,则该命令是错误的;应该是
heroku run rake db:migrate -
我正在使用版本 heroku-gem/2.28.12 (universal-darwin11.0) ruby/1.8.7 我正在运行雪松堆栈并尝试使用 heroku run rake db:migrate,同样的错误:o (
-
heroku logs告诉你什么?您使用的是 heroku gem 还是 heroku toolbelt? (toolbelt.herokuapp.com) -
您确定您当前正在运行 Ruby 1.8.7 吗? heroku 工具带(我没有安装 gem)似乎不能很好地与 Ruby 1.9.x 配合使用,返回那个错误。切换到 Ruby 1.8.7 为我解决了这个问题。
-
我正在使用工具带。我是一个 nube 并且远离更改我的 ruby 版本,只是切换到使用 heroku gem 是另一种解决方案吗?
标签: ruby-on-rails deployment heroku web-deployment