0

我的根 URL 页面是通过调用加载的render :stream => true,而我的所有其他控制器都正常呈现。通过 nginx 访问该站点时,一切正常。通过 localhost(不通过 nginx)访问时,我没有得到任何响应。使用 curl,我只得到标题和 doctype 声明,但没有任何应该通过 erb 呈现的内容。查看我的日志,我发现它在呈现模板之前给出了“已完成”消息。

Started GET "/" for 127.0.0.1 at 2013-10-03 21:40:31 -0400
Processing by HomeController#index as HTML
Completed 200 OK in 9ms (Views: 7.0ms | ActiveRecord: 0.0ms)
  Rendered shared/_meta_data.html.erb (1.0ms)
  Sitemap Load (1.0ms)  SELECT `sitemaps`.* FROM `sitemaps` ORDER BY name, action, controller
  Event Load (1.0ms)  SELECT `events`.* FROM `events` WHERE (YEAR(end_time) >= 2013) ORDER BY permanent, start_time, name
  Rendered shared/_navigation.html.erb (21.0ms)
  Rendered home/index.html.erb within layouts/application (335.0ms)


Started GET "/events" for 127.0.0.1 at 2013-10-03 21:40:47 -0400
Processing by EventsController#index as HTML
  Event Load (1.0ms)  SELECT `events`.* FROM `events` WHERE ('2013-10-03' BETWEEN DATE_ADD(start_time, INTERVAL -4 MONTH) AND end_time) ORDER BY start_time, name
  Rendered events/_event.html.erb (2.0ms)
  Rendered events/index.html.erb within layouts/application (4.0ms)
  Rendered shared/_meta_data.html.erb (1.0ms)
  Sitemap Load (3.0ms)  SELECT `sitemaps`.* FROM `sitemaps` ORDER BY name, action, controller
  Rendered shared/_navigation.html.erb (12.0ms)
Completed 200 OK in 355ms (Views: 348.0ms | ActiveRecord: 4.0ms)

因此,它就像在实际发送任何真实数据之前关闭了连接。nginx 关闭了代理缓冲区。

我正在使用 Windows > nginx 1.3.14 > Thin v1.5 > Rails v3.2.11 > Ruby v1.9.3p0

4

0 回答 0