繁体   English   中英

从Heroku开始的Rails Unicorn Web服务器出现问题

[英]Trouble with Rails Unicorn Web Server starting on Heroku

我一直在对Heroku上崩溃的应用程序进行故障排除,但未成功。 我正在使用:

  • Ruby 2.1.0
  • Rails 4.1.6
  • 独角兽Web服务器

当我转到我的网址时,出现应用程序错误。

这些是heroku logs的最后几行

2015-03-13T20:44:36.095469+00:00 app[web.1]:    from config.ru:1:in      `new'
2015-03-13T20:44:36.095481+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.1.0/bin/unicorn:23:in `load'
2015-03-13T20:44:36.095477+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.1.0/gems/unicorn-    4.8.3/lib/unicorn/http_server.rb:764:in `build_app!'
2015-03-13T20:44:36.095483+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.1.0/bin/unicorn:23:in `<main>'
2015-03-13T20:44:36.095470+00:00 app[web.1]:    from config.ru:1:in `<main>'
2015-03-13T20:44:36.095471+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn.rb:48:in `eval'
2015-03-13T20:44:36.095467+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.1.0/gems/rack-1.5.2/lib/rack/builder.rb:55:in `initialize'
2015-03-13T20:44:36.095473+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn.rb:48:in `block in builder'
2015-03-13T20:44:36.095474+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:764:in `call'
2015-03-13T20:44:36.095479+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/lib/unicorn/http_server.rb:137:in `start'
2015-03-13T20:44:36.095480+00:00 app[web.1]:    from /app/vendor/bundle/ruby/2.1.0/gems/unicorn-4.8.3/bin/unicorn:126:in `<top (required)>'
2015-03-13T20:44:36.912915+00:00 heroku[web.1]: Process exited with status 1
2015-03-13T20:44:37.040788+00:00 heroku[web.1]: State changed from starting to crashed
2015-03-13T20:45:09.859594+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/" host=stand-as-witnesses-staging.herokuapp.com request_id=2228b811-6b37-482e-a1ec-630699947581 fwd="71.232.132.204" dyno= connect= service= status=503 bytes=

Heroku ps提供:

=== web (1X): `bundle exec unicorn -p $PORT -c ./config/unicorn.rb`
web.1: crashed 2015/03/13 16:44:37 (~ 19m ago)

我从Ruby 2.0.0升级到2.1.0,从Unicorn 4.6.3升级到4.8.3,看看是否可以解决问题,但是在那里没有帮助。

我的Procfile和app / config / unicorn.rb文件是标准的,基于Heroku使用unicorn的说明。

由于该应用程序在本地运行良好,所以有人可以指出为什么我会崩溃吗?

谢谢!

似乎您应该在app/admin/blocked_site.rb AA文件中指定控制器的模型类(据我所知这是BlockedSite )。 这应该修复错误:

superclass mismatch for class BlockedSitesController (TypeError)

感谢您指出正确的方向。 事实证明,问题在于我们在app/controllers/admin/blocked_sites_controller.rb有一个现有文件。 当我在同一位置删除该文件和其他几个文件时,崩溃消失了,我得以导航到我的页面。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM