You include it in your Rails setup, by adding the Sprocket directive
require jquery.css.cleaner in
bootstrap.min works just fine)
You run your Rails app. It fails.
Here's the reason why this fails. Sprockets assumes a naming scheme that allows multiple language processing based on the filename, using dot delimited file extensions. Those that are understood, e.g.
.css, are used as directives for engine work. Since we used a specific substring of
.css in our file, even though the actual file type is
There are multiple solutions for this: either rename the file in a way that removes the
//= require jquery.css.cleaner.js
jquery.css.cleaner.js referenced in this post is a really nice tool for checking orphaned css elements. The version I used was improved by Joaquín Núñez.