Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails manifest file not found (deploying with Capistrano)

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!

like image 402
Borja Moya Avatar asked Dec 20 '17 20:12

Borja Moya


2 Answers

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.

like image 146
Borja Moya Avatar answered Nov 21 '22 18:11

Borja Moya


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

like image 20
Paul Odeon Avatar answered Nov 21 '22 17:11

Paul Odeon