Hacker News new | ask | show | jobs
by SingAlong 5566 days ago
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.

1 comments

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...)

Hmm, I agree. I just realized that what I was doing was a bad hack. I'll change my practice.
Glad you realized that! :-)