可能的重复:
“警告无法确定响应正文的内容长度。”是什么意思?意思是我该如何摆脱它? https://stackoverflow.com/questions/7082364/what-does-warn-could-not-determine-content-length-of-response-body-mean-and-h
我刚刚升级到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
根据之前的 SO 线程,我尝试了以下操作:
/config/application.rb
config.assets.logger = false
config.assets.logger = nil
这些都不起作用。关于如何禁用此错误的日志记录有什么想法吗?或者解决这个问题:)
Thanks
这是Webrick的问题。
您可以使用“薄”代替。
将其添加到 Gemfile 中
gem 'thin'
then rails s
将使用 Thin 而不是 Webrick,警告就会消失。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)