Posted over 6 years ago by Oren Teich
No, we’re not talking back. Instead, we’re excited to announce that you can now use Sass on Heroku.
We’re big believers in elegance here, and Sass is a way to bring elegance to your CSS and page layout. Due to our read-only filesystem Sass hasn’t worked well on Heroku. Thanks to the efforts of one of our awesome engineers, there’s now a beta plugin available that enables you to use Sass & Heroku frictionlessly.
To use the plugin, install Sass as you normally would – include the HAML gem in your gem manifest. Then, script/plugin install the sass_on_heroku plugin:
$ script/plugin install git://github.com/heroku/sass_on_heroku.git
The plugin compiles Sass files to tmp/ and serves them from there. We’re able to do this magic by adding Rack middleware on top of your Rails app that quickly detects requests for Sass CSS files, and serve them with proper caching headers.
The plugin is in beta. We’d love to hear from you if you run into any issues.