RailsApps / rails_layout

Generates Rails application layout files for various front-end frameworks.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[Rails 4.1] Sprockets error: Asset filtered out and will not be served

DanielKehoe opened this issue · comments

When using Foundation with Rails 4.1.0, when visiting any page of the rails-foundation example app, I get this error:

Sprockets::Rails::Helper::AssetFilteredError at /
Asset filtered out and will not be served: add `config.assets.precompile += %w( vendor/modernizr )` to `config/application.rb` and restart your server

This is because sanity checks from the sprockets_better_errors gem have been merged into Rails 4.1. The intent is to reveal asset pipeline errors that you would see in production when you run the app in development mode. See rails/sprockets-rails#84

To resolve this, the rails_layout gem should update the config/application.rb file to include:

config.assets.precompile += %w( vendor/modernizr )

Note that the filename should not include the .js file extension.