'Not all active storage files being loaded. Ruby on Rails. Production Active Storage
I have a Ruby on Rails application that had previous Active storage files already. Upon an update to the application, files that are not images are no longer able to be loaded (pdfs, dosx, etc.)
The server was setup with a local storage.
I am not for sure if this was caused by the update or if something happened to the files.
Solution 1:[1]
As you told in comments the problem is that between releases mina doesn't copy your saved ActiveStorage files
To fix that you need to set up shared folder
Add to your config/deploy.rb
set :shared_dirs, fetch(:shared_dirs, []).push('storage')
It could contain other shared folders already, just add ActiveStorage folder (by default it is storage, but you can check it in config/storage.yml)
Then copy from release folder to shared folder storage folder with files
Next deploy must be successful
Please look directory structure
https://github.com/mina-deploy/mina/blob/v0.3.8/Readme.md#directory-structure
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | mechnicov |
