Rectangle 27 0

ruby on rails WARN Could not determine content length of response body. Set content length of the response or set Response chunked = true?


I explicitly added version 1.3.1 of WEBrick to my gemfile and this solved the problem.

Strange: According to the message that displays when I run rails s, I was already using WEBrick 1.3.1 (with Rails 3.2.8), but I was still getting the warning messages. I added gem 'webrick', '1.3.1' to my gemfile and the warnings stopped. A different version of 1.3.1?

This did NOT fix it for me, perhaps because I am using RVM. wasn't sure where to make this change with RVM. However putting gem 'webrick', '1.3.1' in my Gemfile and bundle install and restart server worked for me and removed the message.

Note
Rectangle 27 0

ruby on rails WARN Could not determine content length of response body. Set content length of the response or set Response chunked = true?


puma

@cam song: almost correct: rails s thin will use thin instead of Webrick, and the warn will disappear.

I second using thin instead of WEBrick. However. On Windows the install of the thin dependencies (more specifically the eventmachine) may be problematic. I use the following in my Gemfile to get a clean install of thin: gem 'eventmachine', '1.0.0.rc.4', :platforms => [:mswin, :mingw]. Note: I installed Rails via the RailsInstaller which includes the DevKit. Might not work without it(?).

On Rails 3.2 and above rails s will use thin if it exists in the Gemfile.

Note
Rectangle 27 0

ruby on rails WARN Could not determine content length of response body. Set content length of the response or set Response chunked = true?


puma

@cam song: almost correct: rails s thin will use thin instead of Webrick, and the warn will disappear.

I second using thin instead of WEBrick. However. On Windows the install of the thin dependencies (more specifically the eventmachine) may be problematic. I use the following in my Gemfile to get a clean install of thin: gem 'eventmachine', '1.0.0.rc.4', :platforms => [:mswin, :mingw]. Note: I installed Rails via the RailsInstaller which includes the DevKit. Might not work without it(?).

On Rails 3.2 and above rails s will use thin if it exists in the Gemfile.

Note
Rectangle 27 0

ruby on rails WARN Could not determine content length of response body. Set content length of the response or set Response chunked = true?


I explicitly added version 1.3.1 of WEBrick to my gemfile and this solved the problem.

Strange: According to the message that displays when I run rails s, I was already using WEBrick 1.3.1 (with Rails 3.2.8), but I was still getting the warning messages. I added gem 'webrick', '1.3.1' to my gemfile and the warnings stopped. A different version of 1.3.1?

This did NOT fix it for me, perhaps because I am using RVM. wasn't sure where to make this change with RVM. However putting gem 'webrick', '1.3.1' in my Gemfile and bundle install and restart server worked for me and removed the message.

Note