AnA*_*ice 119 ruby-on-rails ruby-on-rails-3
我刚刚升级到rails 3.2.2,现在在rails s,页面加载,我在日志中得到所有这些错误:
[2012-03-07 19:46:14] WARN Could not determine content-length of response body. Set content-length of the response or set Response#chunked = true
[2012-03-07 19:46:14] WARN Could not determine content-length of response body. Set content-length of the response or set Response#chunked = true
Run Code Online (Sandbox Code Playgroud)
根据以前的SO线程,我尝试了以下内容:
/config/application.rb
config.assets.logger = false
config.assets.logger = nil
Run Code Online (Sandbox Code Playgroud)
这些都没有奏效.有关如何针对此错误禁用此日志记录的任何想法?或者解决问题:)
谢谢
Cam*_*ong 165
这是Webrick的问题.你可以使用"Thin"代替.
将其添加到Gemfile
gem 'thin'
Run Code Online (Sandbox Code Playgroud)
然后rails s将使用薄而不是Webrick,警告将消失.
Ant*_*ony 28
Amiel Martin提到的补丁对我有用!只需找到你的webrick路径(例如,Windows上的c:\ Ruby\lib\ruby\1.9.1\webrick \)并更改httpresponse.rb文件,如https://bugs.ruby-lang.org/attachments/中所述2300/204_304_keep_alive.patch
别忘了重启Webrick!
| 归档时间: |
|
| 查看次数: |
54185 次 |
| 最近记录: |