gpt4 book ai didi

ruby-on-rails - heroku/cli.rb :30:in `start' : undefined method `error_with_failure'

转载 作者:行者123 更新时间:2023-12-04 05:39:29 24 4
gpt4 key购买 nike

我正在与 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 和工具带而 Ruby 混淆了从什么时候加载什么的冲突。如果您想使用工具带,我强烈建议您卸载您可能必须避免这种情况的任何 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/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com