'学习Ruby on Rails'教程:无法提交联系表格

时间:2014-10-02 02:58:04

标签: heroku learn-ruby-on-rails

我按照本书Learn Ruby on Rails中的教程获得了以下错误。

我可以通过在浏览器中输入网址来手动启动我的应用,但我想知道为什么 Heroku打开不起作用。

知道这里发生了什么吗?

Heroku打开错误...

$ heroku open                                                                                                             
Opening peaks-app... failed                                                                                                                                                         
 !    Heroku client internal error.                                                                                                                                                 
 !    Search for help at: https://help.heroku.com                                                                                                                                   
 !    Or report a bug at: https://github.com/heroku/heroku/issues/new                                                                                                               

    Error:       Unable to find a browser command. If this is unexpected, Please rerun with environment variable LAUNCHY_DEBUG=true or the '-d' commandline option and file a bug at
 https://github.com/copiousfreetime/launchy/issues/new (Launchy::CommandNotFoundError)                                                                                              
    Backtrace:   /home/action/.heroku/client/vendor/gems/launchy-2.4.2/lib/launchy/applications/browser.rb:63:in `browser_cmdline'                                                  
                 /home/action/.heroku/client/vendor/gems/launchy-2.4.2/lib/launchy/applications/browser.rb:67:in `cmd_and_args'                                                     
                 /home/action/.heroku/client/vendor/gems/launchy-2.4.2/lib/launchy/applications/browser.rb:78:in `open'                                                             
                 /home/action/.heroku/client/vendor/gems/launchy-2.4.2/lib/launchy.rb:29:in `open'                                                                                  
                 /home/action/.heroku/client/lib/heroku/helpers.rb:328:in `block in launchy'                                                                                        
                 /home/action/.heroku/client/lib/heroku/helpers.rb:227:in `action'                                                                                                  
                 /home/action/.heroku/client/lib/heroku/helpers.rb:326:in `launchy'                                                                                                 
                 /home/action/.heroku/client/lib/heroku/command/apps.rb:342:in `open'                                                                                               
                 /home/action/.heroku/client/lib/heroku/command.rb:217:in `run'                                                                                                     
                 /home/action/.heroku/client/lib/heroku/cli.rb:33:in `start'                                                                                                        
                 /home/action/.parts/bin/heroku:24:in `<main>'                                                                                                                      

    Command:     heroku open                                                                                                                                                        
    Version:     heroku-toolbelt/3.12.1 (x86_64-linux) ruby/2.1.1 

1 个答案:

答案 0 :(得分:2)

简短的回答是Heroku使用Launchy启动我的应用程序,Launchy正在寻找我的浏览器。由于我使用的是Nitrous.io,我没有安装浏览器,因此Launchy不知道该怎么做。

Launchy的作者解释说“如果没有安装浏览器,从虚拟机内启动浏览器将无能为力。” https://github.com/copiousfreetime/launchy/issues/78

此时手动启动似乎是我唯一的选择。