Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save DianaEromosele/e890a295c12110047d4ff2858ac8d049 to your computer and use it in GitHub Desktop.
Save DianaEromosele/e890a295c12110047d4ff2858ac8d049 to your computer and use it in GitHub Desktop.
Preparing Rails app (with photos) to deploy to Heroku
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