# Images not showing up

**URL:** <https://www.ruby-forum.com/t/images-not-showing-up/62666>\
**Category:** Rails\
**Created:** [June 7, 2006, 3:44am UTC](https://www.ruby-forum.com/t/images-not-showing-up/62666 "2006-06-07T03:44:46Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![vince](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/b5e925/32.png) [@vince](https://www.ruby-forum.com/u/vince)\
**Post date:** [June 7, 2006, 3:44am UTC](https://www.ruby-forum.com/t/images-not-showing-up/62666/1 "2006-06-07T03:44:46Z")

</div>

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:in`recognize!’

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

---

<div class="post-metadata">

**Author:** ![vince](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/b5e925/32.png) [@vince](https://www.ruby-forum.com/u/vince)\
**Post date:** [June 7, 2006, 4:08am UTC](https://www.ruby-forum.com/t/images-not-showing-up/62666/2 "2006-06-07T04:08:38Z")

</div>

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:in`recognize!’
> 
> 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

---

<div class="post-metadata">

**Author:** ![vince](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/b5e925/32.png) [@vince](https://www.ruby-forum.com/u/vince)\
**Post date:** [June 7, 2006, 4:38am UTC](https://www.ruby-forum.com/t/images-not-showing-up/62666/3 "2006-06-07T04:38:00Z")

</div>

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](http://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

---

<div class="post-metadata">

**Author:** ![vince](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/b5e925/32.png) [@vince](https://www.ruby-forum.com/u/vince)\
**Post date:** [June 7, 2006, 6:21pm UTC](https://www.ruby-forum.com/t/images-not-showing-up/62666/4 "2006-06-07T18:21:42Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![vince](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/v/b5e925/32.png) [@vince](https://www.ruby-forum.com/u/vince)\
**Post date:** [June 7, 2006, 4:40am UTC](https://www.ruby-forum.com/t/images-not-showing-up/62666/5 "2006-06-07T04:40:22Z")

</div>

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?
