【问题标题】:Starting Foreman app in Ruby for Heroku installl在 Ruby 中为 Heroku 安装启动 Foreman 应用程序
【发布时间】:2012-01-15 19:08:45
【问题描述】:

我正在尝试部署一个简单的应用程序,开始使用 Heroku/Cedar,但在 Windows 中是不可能的。运行“工头启动”时出现下一个错误,执行“捆绑安装”时也出现错误,我被困住了。在this post 他们得出结论,在 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>'

【问题讨论】:

    标签: ruby heroku pty foreman


    【解决方案1】:

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

    $ gem install foreman --pre
    

    【讨论】:

    • 谢谢,我希望它对某人有所帮助,但现在我在 Windows 上不再需要 Heroku,因此我不能说它是否能解决问题:-)
    【解决方案2】:

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

    似乎有人在用 C# 重新实现 Foreman,你可以看看 here

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

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

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2012-08-07
      • 2013-10-01
      • 2016-07-31
      • 2020-09-05
      • 2012-07-11
      • 1970-01-01
      • 1970-01-01
      • 2018-02-15
      相关资源
      最近更新 更多