Rack error (not compilation on the fly) servicing assets during development

Service assets began to create 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 use coffeescript and SCSS (application.js.coffee and application.css.scss)

From the 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. The Google results for this error are close to nonexistent.

+6
source share
2 answers

Answer above, fixed it for me in one case, however I again reached this question in another project and found similarities between them.

Caching during development is causing this problem, in development.rb just add / update the following line and restart the application:

config.action_controller.perform_caching = false

+6
source

I got the same problem for several days. I believe the problem was caused by a conflict between the latest version of the rails and old gems. Updating your gems should solve the problem (this was for me).

+3
source

All Articles