1

我正在尝试部署一个简单的应用程序,开始使用 Heroku/Cedar,但在 Windows 中是不可能的。运行“工头启动”时出现下一个错误,执行“捆绑安装”时也出现错误,我被困住了。在这篇文章中,他们得出结论,在 Windows 中使用它是不可能的,但我知道人们正在使用当前版本在 Windows 中工作,所以我不知道他们是如何做到的,如果他们使用另一个 gem 而不是“工头”。我对此很陌生,所以我无法管理解决方案/解决方法。

c:\workspace\rorprueba>ruby -v
ruby 1.9.2p290 (2011-07-09) [i386-mingw32]

c:\workspace\rorprueba>gem list | grep heroku
heroku (2.18.1)

c:\workspace\rorprueba>foreman start
C:/RailsInstaller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require': no such file to load -- pty (LoadError)
        from C:/RailsInstaller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/foreman-0.32.0/lib/foreman/engine.rb:5:in `<top (required)>'
        from C:/RailsInstaller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from C:/RailsInstaller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/foreman-0.32.0/lib/foreman/cli.rb:2:in `<top (required)>'
        from C:/RailsInstaller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/custo m_require.rb:36:in `require'
        from C:/RailsInstaller/Ruby1.9.2/lib/ruby/site_ruby/1.9.1/rubygems/custom_require.rb:36:in `require'
        from C:/RailsInstaller/Ruby1.9.2/lib/ruby/gems/1.9.1/gems/foreman-0.32.0/bin/foreman:5:in `<top (required)>'
        from C:/RailsInstaller/Ruby1.9.2/bin/foreman:19:in `load'
        from C:/RailsInstaller/Ruby1.9.2/bin/foreman:19:in `<main>'
4

2 回答 2

4

使用以下foreman for windows可能会成功

$ gem install foreman --pre
于 2012-09-25T13:36:27.090 回答
0

Windows 没有真正的伪终端,因此 PTY 库不可用。Foreman 需要这个,因此似乎无法在 Windows 上工作。

似乎有人正在研究 Foreman 的 C# 重新实现,您可以在这里查看

来源:https ://github.com/ddollar/foreman/issues/41

您还可以查看文件 Procfile。这是工头用来查看要启动哪些进程的。您可以自己执行该命令,而不是使用工头。

于 2012-01-15T19:34:26.483 回答