Sprockets::Rails::Nonexistent
Notify nonexsistent stylesheet or javascript through sprockets-rails.
When you use stylesheet_link_tag
or javascript_include_tag
in development or test, rails continues rendering if those asset files don't exist.
But that cause error in production, for example isn't precompiled
.
Installation
Add this line to your application's Gemfile:
gem 'sprockets-rails-nonexistent'
And then execute:
$ bundle
Or install it yourself as:
$ gem install sprockets-rails-nonexistent
Usage
You can use stylesheet_link_tag
and javascript_include_tag
same as before.
When sprockets can not find stylesheet or javascript, raise error in development and test.
Contributing
- Fork it ( https://github.com/h3poteto/sprockets-rails-nonexistent/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request