相关疑难解决方法(0)

警告无法确定响应正文的内容长度.设置响应的内容长度或设置Response#chunked = true

可能重复:
"WARN无法确定响应体的内容长度."是什么意思以及如何摆脱它?

我刚刚升级到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)

这些都没有奏效.有关如何针对此错误禁用此日志记录的任何想法?或者解决问题:)

谢谢

ruby-on-rails ruby-on-rails-3

119
推荐指数
3
解决办法
5万
查看次数

标签 统计

ruby-on-rails ×1

ruby-on-rails-3 ×1