Rails 4 images not loading on heroku

后端 未结 9 1660
一个人的身影
一个人的身影 2020-11-28 01:40

I have spent the better part of the day trying to get images to load on my heroku app. Everything I try works locally, but not after being deployed to heroku.

I h

9条回答
  •  北荒
    北荒 (楼主)
    2020-11-28 02:30

    Another issue, I was having with this was that I was precompiling my assets locally, prior to loading it to heroku. This requires you to follow a different set of steps, which can be found below. If you precompile your assets locally, you must follow these steps or any updates you made to your assets folder will not be reflected in prod.

    https://devcenter.heroku.com/articles/rails-asset-pipeline

    RAILS_ENV=production bundle exec rake assets:precompile

    commit and push to server.

提交回复
热议问题