I'm trying to deploy a rails app using Capistrano, but it fails because there's no manifest file.
This is what I get when I run cap production deploy
:
01 mkdir -p /home/deploy/list/releases/20171220202012/assets_manif…
✔ 01 influencerlist.io 0.048s
WARN Rails assets manifest file not found.
(Backtrace restricted to imported tasks)
cap aborted!
SSHKit::Runner::ExecuteError: Exception while executing on host influencerlist.io: Rails assets manifest file not found.
Caused by:
Capistrano::FileNotFound: Rails assets manifest file not found.
Tasks: TOP => deploy:assets:backup_manifest
(See full trace by running task with --trace)
The deploy has failed with an error: Exception while executing on host influencerlist.io: Rails assets manifest file not found.
Any idea how to solve this issue? I've tried to find a solution but none of them seem to work.
Thank you!
I solved it, and I'm surprised with the solution...
I created two empty files in /shared/public/assets called .manifest.json and .sprockets-manifest.json, and it worked.
If you use webpacker in your Rails application, and you have completely disabled Sprockets, you might get the following error when trying to deploy: Rails assets manifest file not found. This happens inside the deploy:assets:backup_manifest
task.
This task is build for Sprockets and does not work with webpacker. Simply skip it, by adding the following line to your config/deploy.rb
:
Rake::Task["deploy:assets:backup_manifest"].clear_actions
https://makandracards.com/makandra/100898-fix-for-rails-assets-manifest-file-not-found-in-capistrano-deploy
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