images won't deploy

June 29, 2013 2.2k views
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.
3 Answers
I checked the directories on my server and the images are actually there, so I'm wondering if there's a different explanation.

Inside my application directory on my server, there's three subdirectories

current releases shared
which is a setup created by the deployment script I borrowed from Ryan Bates.

I can see the images in the images directory of the assets folder in current

current/app/assets/images$ ls
glyphicons-halflings.png glyphicons-halflings-white.png qb.png
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

but rather

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.

Do you know how I can deal with this problem?

contents of /shared/assets

/shared/assets$ ls
application-39c95ed7b8d86b0698b6c443563e33c7.js fontawesome-webfont-c4adb9424c8b6a6b1b9b0d2627528c4c.woff
application-39c95ed7b8d86b0698b6c443563e33c7.js.gz fontawesome-webfont-f57557847fd1897100790d9df344ded8.ttf
application-7a6376d676fb88537b9f839687ccaad3.css glyphicons-halflings-4e5b89324f1ac987ddf6835ef51f5fe9.png
application-7a6376d676fb88537b9f839687ccaad3.css.gz glyphicons-halflings-white-2fa53df59ca25ee50f59f971c0c9175d.png
application-a184171300937caf263adbc5e8582ba4.css manifest-990c8a24196fee5e9c394078c326c763.json
application-a184171300937caf263adbc5e8582ba4.css.gz myimage-0bb3f134943971c95b2abdfd30f932c7.png
fontawesome-webfont-57b442a30fcae0d4334299c521a326a2.svg twitter
Please pastebin your webserver's virtualhost config files.

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

Have another answer? Share your knowledge.