Skip to content

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

Closed
@DanielKehoe

Description

@DanielKehoe

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions