images won't deploy

  • Posted June 29, 2013

I deployed a Rails app successfully, however, the images are not displaying. This is an error that’s showing in the console

GET 404 (Not Found)

First of all, this is noteworthy because on my local machine, images are located in an images folder within the assets directory, so I was surprised to see them in the assets directory (without an images folder) on the production server. However, that may be because Rails compiles everything. Anyways, I tried to put the images directly in the assets directory on my local machine, and then push those to github and re-deploy but I’ve got the same problem, so I don’t think it’s about the directory they’re in but rather that the images aren’t getting written to the server.


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.

Any progress on this? I’m facing the same issue

Please pastebin your webserver’s virtualhost config files.

I checked the directories on my server and the images are actually there, so I’m wondering if there’s a different explanation. <br> <br>Inside my application directory on my server, there’s three subdirectories <br> <br>current releases shared <br>which is a setup created by the deployment script I borrowed from Ryan Bates. <br> <br>I can see the images in the images directory of the assets folder in current <br> <br> current/app/assets/images$ ls <br>glyphicons-halflings.png glyphicons-halflings-white.png qb.png <br>However, in the assets folder of the shared directory (which is I’m guessing where they’re being put after everything’s compiled for production), the same images have some (I’m assuming) cache information attached to them, such that the image I want isn’t <br> <br>myimage.png <br>but rather <br> <br>myimage-0bb3f134943971c95b2abdfd30f932c7.png <br>I’m wondering if this is what’s causing the 404 error, as (I’m assuming) the code’s looking for myimage.png in the shared/assets directory. <br> <br>Do you know how I can deal with this problem? <br> <br>contents of /shared/assets <br> <br>/shared/assets$ ls <br>application-39c95ed7b8d86b0698b6c443563e33c7.js fontawesome-webfont-c4adb9424c8b6a6b1b9b0d2627528c4c.woff <br>application-39c95ed7b8d86b0698b6c443563e33c7.js.gz fontawesome-webfont-f57557847fd1897100790d9df344ded8.ttf <br>application-7a6376d676fb88537b9f839687ccaad3.css glyphicons-halflings-4e5b89324f1ac987ddf6835ef51f5fe9.png <br>application-7a6376d676fb88537b9f839687ccaad3.css.gz glyphicons-halflings-white-2fa53df59ca25ee50f59f971c0c9175d.png <br>application-a184171300937caf263adbc5e8582ba4.css manifest-990c8a24196fee5e9c394078c326c763.json <br>application-a184171300937caf263adbc5e8582ba4.css.gz myimage-0bb3f134943971c95b2abdfd30f932c7.png <br>fontawesome-webfont-57b442a30fcae0d4334299c521a326a2.svg twitter <br>fontawesome-webfont-8140ac47a16c8f7074e59f2ebe0657eb.eot