Images not showing up


#1

I moved my working rails app from one server to another and suddenly my
images are not showing up. In the production log I see this:

ActionController::RoutingError (Recognition failed for
“/images/header.jpg”):
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/routing.rb:488:in
recognition_failed' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/routing.rb:478:inrecognize!’

It looks like it’s looking in “/images” instead of “…/images” or
whatever. Is there any way to fix this?


#2

Vince W. wrote:

I moved my working rails app from one server to another and suddenly my
images are not showing up. In the production log I see this:

ActionController::RoutingError (Recognition failed for
“/images/header.jpg”):
/usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/routing.rb:488:in
recognition_failed' /usr/lib/ruby/gems/1.8/gems/actionpack-1.12.1/lib/action_controller/routing.rb:478:inrecognize!’

It looks like it’s looking in “/images” instead of “…/images” or
whatever. Is there any way to fix this?

My experience with this thing is to convert all html img tag to
image_tag. This has saved me these headaches…

ajay


#3

I don’t think that’s my issue. I’m also fairly certain it’s not
permissions based. I went to the images directory via my web browser
(foo.com/images) and, instead of seeing the images listed, I get a
directory listing like so:

Index of /images/
Name Last Modified Size Type
Parent Directory/ - Directory
C/ 2006-Jun-05 16:55:14 - Directory
desktop-base/ 2006-Jun-05 17:04:25 - Directory

No idea why I would see C/ or desktop-base… I have no idea where those
dirs might be located on my server. This is a ubuntu dapper install
(fresh) running lighttpd.

-Vince


#4

Vince W. wrote:

Edit:

those directories are in /usr/share/images… so for some reason my rails
app is looking for images in /usr/share/images instead of
/pathto/rails/app/public/images

Anyone know why that might be happening?

This is probably a setting on your webserver that points any url
containing /images to that directory.

I don’t understand why this would result in the routing errors that you
originally reported though.

Ray


#5

Edit:

those directories are in /usr/share/images… so for some reason my rails
app is looking for images in /usr/share/images instead of
/pathto/rails/app/public/images

Anyone know why that might be happening?