How to get SASS to work with Rails 3 on Heroku (without using any plugins)(frontcube.com)
frontcube.com
How to get SASS to work with Rails 3 on Heroku (without using any plugins)
http://frontcube.com/blog/2011/how-to-get-sass-to-work-with-rails-3-on-heroku-without-using-any-plugins
Using SASS in Heroku could be a little tricky. This post explains how to do it without using any 3rd party plugins.
2 comments
There is documentation from Heroku on how to get Compass working without plugins. I tried it out before and it works nicely.
http://devcenter.heroku.com/articles/using-compass
http://devcenter.heroku.com/articles/using-compass
A simpler solution. Just add the following line to your production config:
Compass.configuration.sass_options={:never_update=>true}
That's it :) Now when you update the sass files you just have to start the rails dev server once and git commit and push.
Compass.configuration.sass_options={:never_update=>true}
That's it :) Now when you update the sass files you just have to start the rails dev server once and git commit and push.
This is similar to solutions I've had to hack around for gems on heroku before, but just to play devil's advocate, one generally tries to avoid committing anything compiled to source control. Especially if you do that "you just have to..." step manually (instead of, e.g., through a post-commit hook), you're writing yourself technical debt, payable at a future date when the compiled output goes out of sync with the source and this causes a problem on the site not seen by the responsible developer. That is going to be a particularly hard problem to notice and debug, since CSS issues are practically immune to most forms of automated testing.
This will keep happening until you do it the right way. (If I sound like someone who has been burned by this...)
This will keep happening until you do it the right way. (If I sound like someone who has been burned by this...)