For Rails 3, this question and turbo-sprockets-rails3 look great.
For Rails 4, there seems to be some controversy over whether this has been fixed or not.
I'm currently using Rails 4 in production, and it seems that because Capistrano deploy:assets:update_asset_mtimes
touches all assets, deploy:assets:precompile
likewise re-compiles all of them. That recompilation is the single longest step in my cap deploy
.
Ideally, this should be replaced by some checksum based manifest system, so that only those assets that have actually changed (or are dependent on ones that have changed) are re-compiled.
What is the best way to do this? (Assuming we're still doing it on the server, not the dev machine.)
Here is a great blog post from the guys at codeclimate about this. I've taken a look at it but not gone through the steps in production.
http://blog.codeclimate.com/blog/2013/10/02/high-speed-rails-deploys-with-git/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With