 <p>This might be something you can try: <a href="http://www.krautcomputing.com/blog/2012/03/27/how-to-compile-custom-sass-stylesheets-dynamically-during-runtime/" rel="nofollow">http://www.krautcomputing.com/blog/2012/03/27/how-to-compile-custom-sass-stylesheets-dynamically-during-runtime/</a>.</p> <p>I've used this in a Rails 3.2x project and it works fine, but I'm having difficulties getting it working in a different (somewhat modified Rails 4 project).</p> <p>It's older article about compiling css on the fly using the Sprockets::StaticCompiler class.</p>