在遵循Python/Flask Heroku教程时,'foreman start'出现错误

4

我遵循了所有的指示,在执行foreman start命令时出现以下错误:

C:/Program Files (x86)/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/foreman-0.47.0/lib/fo reman/engine.rb:39:in `trap': unsupported signal SIGHUP (ArgumentError)
       from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/foreman-0.47.0/lib/foreman/engine.rb:39:in `start'
       from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/foreman-0.47.0/lib/foreman/cli.rb:34:in `start'
       from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.15.3/lib/thor/task.rb:27:in `run'
       from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.15.3/lib/thor/invocation.rb:120:in `invoke_task'
       from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.15.3/lib/thor.rb:275:in `dispatch'
       from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/thor-0.15.3/lib/thor/base.rb:425:in `start'
       from C:/Program Files (x86)/ruby-1.9.3/lib/ruby/gems/1.9.1/gems/foreman-0.47.0/bin/foreman:7:in `<top (required)>'
       from C:/Program Files (x86)/ruby-1.9.3/bin/foreman:19:in `load'
       from C:/Program Files (x86)/ruby-1.9.3/bin/foreman:19:in `<main>'

1
你的 Procfile 文件里有什么内容? - Ismael
1
根据教程,我应该执行以下操作:网页:python app.py - Roman Levin
2个回答

3

我曾经遇到过类似的问题并解决了它,我认为这个方法也可以解决你的问题(请确保卸载之前安装的ruby版本,因为有时会存在同一个版本的多个安装文件)。以下是解决方案:Foreman start fails on Windows following Heroku tutorial


3

所以,显然foreman在Windows上无法使用,在Heroku教程中没有提到。希望他们能解决这个问题。


3
@Rosarch - 我在 Windows 上成功使用了 foreman,可以查看 https://dev59.com/F2gu5IYBdhLWcg3wTFSi#11436332 上的答案。所以我猜他们的支持人员不够及时更新。 - zenpoy
这个答案是不正确的。Foreman是一个Ruby应用程序,所以您需要先安装Ruby。请参阅Zenpoy提供的链接。 - changokun

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接