Capistrano Asset Removal

Every time I make a cap: Deploying Capistrano deletes my assets, saying that they are not needed. In fact, they are necessary and in order to return them, I have to make cap: assets: precompile after every time I make a cap: deploy, otherwise my site does not have style or images.

This is something with: normalize_asset_timestamps does not work during deployment: finalize_update?

Capistrano v2.14.1, Rails v3.2.11

** Removing assets that haven't been deployed for 10080 minutes... * executing ... ** [out :: server.com] comm: ** [out :: server.com] file 2 is not in sorted order ** [out :: server.com] Removing unneeded asset: application-66c9f07224da686e6b5a64752995df38.css ** [out :: server.com] Removing unneeded asset: application-66c9f07224da686e6b5a64752995df38.css.gz ** [out :: server.com] Removing unneeded asset: application-7b53d1e1411ed0a62ea32ace5ee4e7c2.js ** [out :: server.com] Removing unneeded asset: application-7b53d1e1411ed0a62ea32ace5ee4e7c2.js.gz ** [out :: server.com] Removing unneeded asset: application.css ** [out :: server.com] Removing unneeded asset: application.css.gz ** [out :: server.com] Removing unneeded asset: application.js ** [out :: server.com] Removing unneeded asset: application.js.gz 
+7
source share
1 answer

Here is the solution: https://github.com/capistrano/capistrano/pull/422

Or add

 after "deploy", "assets:precompile" 

at the end of your deploy.rb and wait for the capistrano gem to update

or add that 2 lines to your capistrano gem

or you can update capistrano directly from github

 gem 'capistrano', git: 'https://github.com/capistrano/capistrano.git' 

which I would not recommend

+6
source

All Articles