1

我有一个使用 Webrick 作为其网络服务器的 Sinatra 应用程序(我知道我应该使用 unicorn :)),我将它部署在 Heroku 上,并且在输入 url 时出现以下错误。

2013-10-26T01:28:04.463156+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=bbb-enroll.herokuapp.com fwd="67.188.115.197" dyno= connect= service= status=503 bytes=
2013-10-26T01:28:04.565142+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/favicon.ico host=bbb-enroll.herokuapp.comfwd="67.188.115.197" dyno= connect= service= status=503 bytes=
2013-10-26T01:28:10.665271+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path=/ host=bbb-enroll.herokuapp.com fwd="67.188.115.197" dyno= connect= service= status=503 bytes=

编译正常,但 url 没有打开,heroku logs命令显示错误。这是我的config.ru文件

require './application'
run Sinatra::Application

这是我的 application.rb 文件

... require code .....

webrick_options = {
        :Port               => 8443,
        :Logger             => WEBrick::Log::new($stderr, WEBrick::Log::DEBUG),
        :DocumentRoot       => "/ruby/htdocs",
        #:DoNotReverseLookup => false,
        :SSLEnable          => true,
        :SSLVerifyClient    => OpenSSL::SSL::VERIFY_NONE,
        :SSLCertificate     => IOSCertEnrollment::SSL.certificate,
        :SSLPrivateKey      => IOSCertEnrollment::SSL.key,
        :SSLCertName        => [ [ "CN",WEBrick::Utils::getservername ] ]
}

.//lots of code....
.....
class NBServer  < Sinatra::Base
...//lots of code//...
..
Rack::Handler::WEBrick.run NBServer, webrick_options

我究竟做错了什么!?

4

0 回答 0