Serving assets has started creating this error today:
!! Rack application returned nil body. Probably you wanted it to be an empty string?
!! Unexpected error while processing request: undefined method `each' for nil:NilClass
I am using coffeescript and SCSS (application.js.coffee and application.css.scss)
From Gemfile:
group :assets do
gem 'sass-rails', '~> 3.2.3'
gem 'compass-rails'
gem 'coffee-rails', '~> 3.2.1'
gem 'marionette-rails'
gem 'uglifier', '>= 1.0.3'
end
Using ruby 1.9.3-p392 and 1.9.3-p125 causes this problem. Google results for this error are near non-existant.
Will's answer above fixed it for me in one case, however I reached this issue again in another project and have found a similarity between the two.
Caching in development is causing this issue, in development.rb
simply add/update the following line and restart the application:
config.action_controller.perform_caching = false
I was getting this same issue for a couple of days. I believe that the issue was caused by a conflict between the latest version of rails and older gems. Updating your gems should solve the issue (it did for me).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With