デプロイ自体はエラーなく成功し、アプリのトップページにも問題なくアクセスできるのですが、別のページへ飛ぶとページの一部が表示されなかったり、
We're sorry, but something went wrong.
の画面に移ってしまったりします。
そこで Build Log を確認したところ、以下の警告文が出ていました。
###### WARNING:
You set your `config.active_storage.service` to :local in production. If you are uploading files to this app, they will not persist after the app is restarted, on one-off dynos, or if the app has multiple dynos. Heroku applications have an ephemeral file system. To persist uploaded files, please use a service such as S3 and update your Rails configuration.
これをもとに config/production.rb を見てみると、確かに config.active_storage.service = :local となっています。上の警告文は、local にしたままだと更新が反映されないよ、的なことを言っているのだと思うのですが、ここにある指示通り、Amazon の S3 や Google の GCS などを使わないといけないのでしょうか。
詳しい方がいらっしゃいましたらご教授願います。
回答1件
あなたの回答
tips
プレビュー