Closed jogaco closed 9 years ago
Hi. Sorry for my late reply.
The file assets_manifest_backup
is generated after a successful asset precompilation by the deploy:compile_assets
task in the https://github.com/capistrano/rails gem. It seems that something is going wrong there. The capistrano-faster-assets gem simply checks that the asset compilation for the previous release was successful and copies the manifest and the assets to the new release.
The thing is all my releases directories contain the assets_manifest_backup
but I always see the same message. For instance:
INFO[e436ff2f] Running /usr/bin/env ls /home/deploy/my_project/releases/20141209175003/assets_manifest_backup on my_host
DEBUG[e436ff2f] Command: cd /home/deploy/my_project/releases/20141209175003 && ( RAILS_ENV=production /usr/bin/env ls /home/deploy/my_project/releases/20141209175003/assets_manifest_backup )
DEBUG[e436ff2f] ls: cannot access /home/deploy/my_project/releases/20141209175003/assets_manifest_backup
DEBUG[e436ff2f] : No such file or directory
INFO[3fb6a0da] Running ~/.rvm/bin/rvm 2.1.4@my_project_rails32 do bundle exec rake assets:precompile on my_host
DEBUG[3fb6a0da] Command: cd /home/deploy/my_project/releases/20141209175003 && ( RAILS_ENV=production ~/.rvm/bin/rvm 2.1.4@my_project_rails32 do bundle exec rake assets:precompile )
But the file is created afterwards.
I realized the culprit was a directory under releases that should not have been there. Thanks!
For anybody stumbling over this thread because of the same error:
ls: cannot access /home/deploy/my_project/releases/20141209175003/assets_manifest_backup
No such file or directory
Sprockets 3.0 now saves the manifest as a hidden file in the public directory.
https://github.com/rails/sprockets/blob/v3.7.0/UPGRADING.md#publicassetsmanifest-abc123json-location
For example:
.sprockets-manifest-d6920ff76e860c95236844566807d7b8.json
so the proper command would be to copy this hidden file instead
EDIT:
Actually, this commit:
now handles the hidden file, so you can just ignore this error. The following line in the deploy log:
ls /home/deploy/rails_app/releases/20180707002604/public/assets/.sprockets-manifest*
/home/deploy/rails_app/releases/20180707002604/public/assets/.sprockets-manifest-d6920ff76e860c95236844566807d7b8.json
should have you covered.
Whenever I peform a deploy, I get this error and all assets are precompiled, even if no changes to Gemfile or any of the assets: