Capistrano::FileNotFound: Rails assets manifest file (or backup file) not found : deploy:rollback
- Dominant language
- Ruby
- Stars
- 901
- Forks
- 262
- PR merge metrics
- No merged PRs in 30d
Description
I'm trying `deploy:rollback` to staging from my local machine, everything else is successful, but when it tries to do `deploy:assets:restore_manifest` it fails saying it cannot find the manifest file.
On further debugging, I found that it uses the ruby kernel's `test` method to check if the source and destination are present, as in this line [here](https://github.com/capistrano/rails/blob/master/lib/capistrano/tasks/assets.rake#L93)
But the problem is that the file is present in the remote. Then I debugged more by changing the source and target to my local system's file paths, and it seems that the `test` method to check the file name runs on the local system and not on the remote, only the `execute` commands are running on the remote, so it fails to find the asset manifest file on my local and fails.
Is there anything I might be missing, What should I do to fix this issue?
### Steps to reproduce
Running `cap staging deploy:rollback` from local machine to a remote server.
### Expected behavior
The `test` method should have run on the remote and should have not returned false, the files are present on the remote server.
### Actual behavior
The `test` method in `assets:restore_manifest` runs on local and checks the presence of the source and target(the manifest files) on the local and returns false and thus deployment fails.
### System configuration
https://gist.github.com/snkshukla/2a3bbb9cbfe8f6e957c5add25c2a055f
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with lib/capistrano/tasks/assets.rake around line 93 and reproduce with cap staging deploy:rollback. Trace deploy:assets:restore_manifest to confirm which checks run locally versus through remote execute commands; done means rollback restores the remote manifest or backup without failing when the files exist remotely.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rails, ruby
- Domain
- devops, release
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100