Image doesn't show (rhtml path?)

Hi,

we try to show an image which is not inside the rails
framework, and we are not able to see the image!!!
does someone know how to do this???

our rails is installed on

/opt/rails/project1/, so inside “project1” we have all
the rails directory like “app”, “public”, etc.)

our image is on the “/usr/images/”

so in our link on the rhtml. we use a link like:

, however, we
were never able to see the image!!!

but when we put the image inside the rails framework,
we is able to see the image??

Why we are not able to link image outside of the rails
framework???

Thanks youv very much

Saiho

The mind is its own place, and in itself.
Can make a Heaven of Hell, a Hell of Heaven.


Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around

Saiho ~

The user that runs the webserver does not have permission to access
that file, it would be a huge security hole if it could. You need to
have images in public/images.

~ Ben

On 3/16/06, Saiho Y. [email protected] wrote:

Why we are not able to link image outside of the rails


Ben R.
http://www.benr75.com

If the security is not a problem(the folder contains
only images) so can I simply change the the folder
right?

— Ben R. [email protected] wrote:

On 3/16/06, Saiho Y. [email protected] wrote:

/opt/rails/project1/, so inside “project1” we have

Saiho
Tired of spam? Yahoo! Mail has the best spam

Ben R.
http://www.benr75.com


Rails mailing list
[email protected]
http://lists.rubyonrails.org/mailman/listinfo/rails

The mind is its own place, and in itself.
Can make a Heaven of Hell, a Hell of Heaven.


Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around

If you’re running this under a webserver (apache or lighty), you can
configure a directory
in the file system to be available under a certain path for a given
host. Look at the docs
for your server to see how to do that.

But putting a filesystem path in an html img tag is never gonna work…
and it shouldn’t.
That would be a terrible security hole to just be able to enter any file
path into an html
tag.

b