Looks interesting. Pre-generating asset files for deployment might also be a nice alternative to the usual tricks[1] for using SASS (or other CSS generators) with Heroku, which have rack middleware reading a cache. (Unfortunately, the code samples were a hard for me to read, in both Firefox and Chrome --- all the newlines seem to have somehow gotten squeezed out...) [1] https://github.com/pedro/hassle
I believe that in Rails 3.1 they're including a fix for this, so work arounds like this won't be necessary anymore :)
Bulletproof Rails Asset Caching
11–14 of 14 posts
Re: Bulletproof Rails Asset Caching
#12Compass has helpers that use the Rails asset link helpers to link to images. There are sprite helpers available as well.
AssetFingerPrint is a Rails plugin that tosses and MD5 into the asset link automatically.
Jammit compresses CSS/JS files, and the fingerprint of the resulting compiled files are picked up by AssetFingerPrint.
Thats how we roll at Poll Everywhere.
Re: Bulletproof Rails Asset Caching
#13Earlier quoted context omitted.
I believe that in Rails 3.1 they're including a fix for this, so work arounds like this won't be necessary anymore :)
Got a link to details? I'd be surprised, since any correct solution requires two-stage deployment and keeping old assets around. These capabilities are beyond the scope of a web server framework. The Rails team could certainly educate Rails developers and choose conventions that make correctness easier.
Re: Bulletproof Rails Asset Caching
#14It's difficult for this to not sound snarky, but my definition of bulletproof doesn't involve parsing CSS with bash and awk.