I deployed a simple React+Rails Blog application on Heroku. I deployed separate projects for frontend and backend.
Everything in the application is working fine but the issue is that images disappeared after some time due to routing error. The same URL works for some time but then it stops working.
First I was uploading images using active_storage
and faced this issue and now I am using carrierwave
but the issue is still there. I tried different solutions but nothing worked.
I am facing issue only on production and not on localhost.
Heroku Logs
Production.rb
As of 2020/10/11, Heroku documentation on ActiveStorage says
Recommendation by the same document is
AFAIR, Heorku CLI warns you of this fact. You should have noticed that.