December 21, 2007 by alex
We just switched autoki over to Rails 2.0.2 in the last days. While the transition we replaced the asset_packager plugin with the new Rails 2.0 :cache => true option in stylesheet_link_tag
/javascript_include_tag
.
As our assets (public/*) are served from an apache webserver that has its own checkout of the project, we can’t let Rails generate the all.css/all.js files on the fly when the first request comes in. Instead we have to pre-generate them at deployment. For asset_packager we had a capistrano task that did just that. Rails doesn’t have that. Instead the logic to generate the files is built right into the link/include methods in the AssetTagHelper(!). So now we are simply doing this in our capistrano recipe:
Fire up a mongrel, curl the start page, bring it back down. Feels a bit overkill but it works. (at least I hope it will when I’ll first try it later today)