Search code examples
javascriptruby-on-railsasset-pipelineunicorncloud9-ide

Unicorn: javascript assets ERR_CONTENT_LENGTH_MISMATCH in Rails 3.2.19


I'm using Rails 3.2.19 with Unicorn 4.8.3 in development on Cloud9 and it suddenly stopped to serve well some javascript files (e.g.: jquery/bootstrap).

The error in Chrome console for those files is:

Failed to load resource net::ERR_CONTENT_LENGTH_MISMATCH

I have this configuration in config/application.rb:

config.assets.enabled = true
config.assets.version = '1.0'
config.assets.initialize_on_precompile = false

And this in my config/environments/development.rb:

config.assets.compress = false
config.assets.debug = true

Solution

  • It seems that there is an extreme odd bug on Cloud9 in which the internal C9 Proxy truncates the HTTP Response randomly. I will post again in the future when the C9 bug is fixed.