Created
October 31, 2016 00:53
-
-
Save DianaEromosele/e890a295c12110047d4ff2858ac8d049 to your computer and use it in GitHub Desktop.
Preparing Rails app (with photos) to deploy to Heroku
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Taken from this stackoverflow thread: http://stackoverflow.com/questions/18324063/rails-4-images-not-loading-on-heroku | |
You need to do two things to resolve it. First, change these two lines from false to true in production.rb file. | |
config.assets.compile = true | |
config.assets.digest = true | |
Second, if you've syntax like this for your images | |
background: url("imgo.jpg") | |
Change it to | |
background: image-url("image.jpg") | |
I hope it does your job. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment