我正在与 ssh key 搏斗并上传了一个新 key ,然后我 git push heroku master'ed 很好,然后它显示了我的登陆页面,但显示
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
最佳答案
我见过类似的情况,因为同时安装了 gem 和 toolbelt,而 Ruby 混淆了从何时加载什么内容。如果您想使用 toolbelt,我强烈建议您卸载任何 gem 版本,您可能必须避免这种情况(并且可能一切都应该适合您)。您可以通过运行 gem uninstall heroku
并选择卸载所有版本来完成此操作。如果您仍然遇到问题,请告诉我,我很乐意继续帮助解决问题。谢谢!
关于ruby-on-rails - Heroku/cli.rb :30:in `start' : undefined method `error_with_failure' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11444918/