Question

Rails 4 images not loading

  • Posted February 22, 2014

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.

Subscribe
Share

Submit an answer
You can type!ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

I went into my production.rb file and changed two lines of code and set them to true. It works now without any errors. <br>config.serve_static_assets = true <br>config.assets.compile = true

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

This comment has been deleted

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?