Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save DianaEromosele/e890a295c12110047d4ff2858ac8d049 to your computer and use it in GitHub Desktop.

Select an option

Save DianaEromosele/e890a295c12110047d4ff2858ac8d049 to your computer and use it in GitHub Desktop.

Revisions

  1. DianaEromosele created this gist Oct 31, 2016.
    15 changes: 15 additions & 0 deletions Preparing Rails app (with photos) to deploy to Heroku
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,15 @@
    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.