Rails 4 images not loading

February 22, 2014 10k views
Not really sure why images are not loading on my site. They load perfectly fine on my local server but ones i push it up to the server the images just wont show.
4 Answers
I went into my production.rb file and changed two lines of code and set them to true. It works now without any errors.
config.serve_static_assets = true
config.assets.compile = true
Do you see any errors? I've never used rails but I've seen people precompiling their assets using rake, have you tried doing that?

Same problem happened to me, i solved it changing the image tags:

<%= image_tag "assets/image.png" %>

to :

<%= image_tag "image.png" %>

More info: http://guides.rubyonrails.org/asset_pipeline.html

Have another answer? Share your knowledge.