WARN no pudo determinar el contenido-longitud del cuerpo de respuesta. Set content-longitud de la respuesta o set Response#chunked = true [duplicar]


Posible Duplicado:
Lo que hace "WARN" No pudo determinar el contenido-longitud del cuerpo de respuesta."mean and how to I get rid of it?

Acabo de actualizar a rails 3.2.2, y ahora en rails s, page load, tengo todos estos errores en el registro:

[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

Por lo anterior hilos, he intentado lo siguiente:

/configuración / aplicación.rb

config.assets.logger = false
config.assets.logger = nil

Ninguno de estos funcionó. ¿Alguna idea sobre cómo deshabilitar este registro para este error? O a soluciona el problema:)

Gracias

Author: Community, 2012-03-08

3 answers

Este es un problema de Webrick. puedes usar "Delgado" en su lugar.

Añadir esto al Gemfile

gem 'thin'

Entonces rails s usará thin en lugar de Webrick, y el warn desaparecerá.

 166
Author: Cam Song,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2013-08-10 17:03:17

Parche mencionado por Amiel Martin funciona para mí! Simplemente encuentre su ruta de webrick (ej., c:\Ruby\lib\ruby\1.9.1\webrick \ on Windows) y cambiar httpresponse.archivo rb como se describe en https://bugs.ruby-lang.org/attachments/2300/204_304_keep_alive.patch

Y no olvides reiniciar Webrick!

 28
Author: Anthony,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-05-31 07:48:45
 9
Author: Amiel Martin,
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2012-05-15 17:53:05