Search code examples
ruby-on-rails-3rackunicorn

Unicorn + Rack Lint Error - content header


I keep getting the follow server error when running unicorn on my local machine:

E, [2012-08-17T10:25:11.961002 #95265] ERROR -- : app error: Content-Length header was 780958, but should be 781014 (Rack::Lint::LintError)
E, [2012-08-17T10:25:11.961578 #95265] ERROR -- : /Users/cscairns/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/lint.rb:19:in `assert'
E, [2012-08-17T10:25:11.961893 #95265] ERROR -- : /Users/cscairns/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/lint.rb:501:in `verify_content_length'
E, [2012-08-17T10:25:11.962173 #95265] ERROR -- : /Users/cscairns/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/lint.rb:525:in `each'
E, [2012-08-17T10:25:11.962806 #95265] ERROR -- : /Users/cscairns/.rvm/gems/ruby-1.9.3-p194/gems/rack-1.4.1/lib/rack/body_proxy.rb:26:in `method_missing'
E, [2012-08-17T10:25:11.963116 #95265] ERROR -- : /Users/cscairns/.rvm/gems/ruby-1.9.3-p194/gems/unicorn-4.3.1/lib/unicorn/http_response.rb:41:in `http_response_write'
E, [2012-08-17T10:25:11.963416 #95265] ERROR -- : /Users/cscairns/.rvm/gems/ruby-1.9.3-p194/gems/unicorn-4.3.1/lib/unicorn/http_server.rb:539:in `process_client'
E, [2012-08-17T10:25:11.963702 #95265] ERROR -- : /Users/cscairns/.rvm/gems/ruby-1.9.3-p194/gems/unicorn-4.3.1/lib/unicorn/http_server.rb:606:in `worker_loop'
E, [2012-08-17T10:25:11.963985 #95265] ERROR -- : /Users/cscairns/.rvm/gems/ruby-1.9.3-p194/gems/unicorn-4.3.1/lib/unicorn/http_server.rb:487:in `spawn_missing_workers'
E, [2012-08-17T10:25:11.964288 #95265] ERROR -- : /Users/cscairns/.rvm/gems/ruby-1.9.3-p194/gems/unicorn-4.3.1/lib/unicorn/http_server.rb:137:in `start'
E, [2012-08-17T10:25:11.964744 #95265] ERROR -- : /Users/cscairns/.rvm/gems/ruby-1.9.3-p194/gems/unicorn-4.3.1/bin/unicorn:121:in `<top (required)>'
E, [2012-08-17T10:25:11.965043 #95265] ERROR -- : /Users/cscairns/.rvm/gems/ruby-1.9.3-p194/bin/unicorn:19:in `load'
E, [2012-08-17T10:25:11.965339 #95265] ERROR -- : /Users/cscairns/.rvm/gems/ruby-1.9.3-p194/bin/unicorn:19:in `<main>'
E, [2012-08-17T10:25:11.965624 #95265] ERROR -- : /Users/cscairns/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `eval'
E, [2012-08-17T10:25:11.966223 #95265] ERROR -- : /Users/cscairns/.rvm/gems/ruby-1.9.3-p194/bin/ruby_noexec_wrapper:14:in `<main>'

Has anyone run into the same issue?


Solution

  • This gem, unicorn-rails, fixed the issue: https://github.com/samuelkadolph/unicorn-rails.