Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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



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/


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.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: