Borja Moya
Borja Moya

Reputation: 303

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!

Upvotes: 13

Views: 4341

Answers (3)

richardkmiller
richardkmiller

Reputation: 3022

@Paul Odeon's answer worked for me, and this also worked:

set :assets_prefix, 'packs'

Found at https://github.com/capistrano/rails/issues/235

Upvotes: 0

Paul Odeon
Paul Odeon

Reputation: 4544

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

Upvotes: 13

Borja Moya
Borja Moya

Reputation: 303

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.

Upvotes: 17

Related Questions