简体   繁体   中英

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.

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM