在 Ruby 中启动 Foreman 应用程序以进行 Heroku 安装
我正在尝试部署一个简单的应用程序,在 Heroku/Cedar 上开始,但在 Windows 中这是不可能的。运行“foreman start”时出现下一个错误,并且执行“bundle install”时出现错误,我一直坚持下去。在这篇文章中,他们得出的结论是不可能在Windows中使用它,但我知道人们正在使用当前版本的 Windows 中工作,所以我不知道他们是如何做到的,如果他们使用另一个 gem 而不是“foreman”。我对此真的很陌生,所以我无法管理解决方案/解决方法。
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>'
I'm trying to deploy a simple app, getting started on Heroku/Cedar but it's imposible in Windows. Getting next error running 'foreman start', and also an error doing 'bundle install' and I'm stuck with it. In this post they conclude it's imposible to work with it in windows, but I know people are working in Windows with the current version, so I don't know how they do it, if they use another gem instead of 'foreman'. I'm really new into this, so I can't manage a solution/workaround.
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>'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用以下 Windows 版 foreman 可能会成功
Using the following foreman for windows might do the trick
Windows 没有真正的伪终端,因此 PTY 库不可用。 Foreman 需要这个,因此似乎无法在 Windows 上工作。
似乎有人正在研究 Foreman 的 C# 重新实现,您可以此处查看。
来源:https://github.com/ddollar/foreman/issues/41
你可以还可以查看文件 Procfile.这是 foreman 用来查看要启动哪些进程的工具。您可以自己执行该命令,而不是使用 foreman。
Windows doesn't have true pseudoterminals, so the PTY library isn't available. Foreman requires this, and thus cannot work on Windows, it seems.
There seems to be someone working on a C# re-implementation of Foreman, you could have a look at it here.
Source: https://github.com/ddollar/foreman/issues/41
You could also have a look in the file Procfile. This is what foreman uses to see what processes to start up. You could execute that command yourself instead of using foreman.