This little plugin does all the packaging and compacting for you - on the fly. There's no need to handle any Rake tasks or even copy stuff manually. Simply install the plugin and you're ready to use dynamic asset URLs in your templates.
You can read more about the Bundled Assets plugin here:
- Usage tip: How to use the Bundled assets plugin with Rails' built-in tag helpers
You can grab the source code here: