# Image Problem using /public

**URL:** <https://www.ruby-forum.com/t/image-problem-using-public/129452>\
**Category:** Rails\
**Created:** [February 18, 2008, 7:20pm UTC](https://www.ruby-forum.com/t/image-problem-using-public/129452 "2008-02-18T19:20:27Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![sithadmin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@sithadmin](https://www.ruby-forum.com/u/sithadmin)\
**Post date:** [February 18, 2008, 7:20pm UTC](https://www.ruby-forum.com/t/image-problem-using-public/129452/1 "2008-02-18T19:20:27Z")

</div>

Hi everyone,  
I’m having some funky errors with my images on my rails app. When I am  
at the index page of my “compare” controller, the images work great  
(used a layout). However, when I go to any action in that controller (in  
my case compare/aircards) all the images just go to X’s!! All of the  
images are stored in public/images (I’m using InstantRails, btw). I have  
the console open (ruby script/server) and it says  
“ActionController::UnknownAction (No action responded to images):” .  
What is going on? Do I have to set something differently?

Thank you,

- Jeff M.

---

<div class="post-metadata">

**Author:** ![sithadmin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@sithadmin](https://www.ruby-forum.com/u/sithadmin)\
**Post date:** [February 18, 2008, 7:27pm UTC](https://www.ruby-forum.com/t/image-problem-using-public/129452/2 "2008-02-18T19:27:56Z")

</div>

I’d have to assume that you are not using #image\_tag. You’re probably  
doing img src=“images/yourimage”. Put a leading slash, or use  
image\_tag to make sure that the path is always right.

Jason

---

<div class="post-metadata">

**Author:** ![sithadmin](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/858c86/32.png) [@sithadmin](https://www.ruby-forum.com/u/sithadmin)\
**Post date:** [February 18, 2008, 8:45pm UTC](https://www.ruby-forum.com/t/image-problem-using-public/129452/3 "2008-02-18T20:45:21Z")

</div>

You are exactly right! Thank you for your help, simply putting in that  
slash made all the difference.

Thanks again,

- Jeff
