News for hackers. Stuff that matters.
Re:Bulletproof Rails Asset Caching by rst on Friday February 18, 2011 @10:18AM (#2235685)
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

Re:Bulletproof Rails Asset Caching by nborgo on Friday February 18, 2011 @12:23PM (#2236307)
Might I suggest Jammit? You can write a rake task that packages all the assets, uploads the files to s3 and deletes the asset folder. Change the asset host to your s3 bucket or Cloudfront. Whenever you deploy, do 'rake deploy:assets' and you're set.

http://documentcloud.github.com/jammit/

Re:Bulletproof Rails Asset Caching by Oompa on Friday February 18, 2011 @10:24AM (#2235714)
I believe that in Rails 3.1 they're including a fix for this, so work arounds like this won't be necessary anymore :)
Re:Bulletproof Rails Asset Caching by 2is10 on Friday February 18, 2011 @12:42PM (#2236395)
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.