Forum: Ruby on Rails Strange Problem with inclusion of images and stylesheets

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Hemant K. (Guest)
on 2006-06-03 15:58
(Received via mailing list)
We are a small team working on a rails app and the webserver is
Apache2.0,
running on Ubuntu and using fcgid.

We are running rails in development mode. As i know, to include a image
or
css or javascript, one can use plain HTML style of inclusions like:
 < img src=""></img> , <link href=""> or rails way of including things
like
<%= javascript_include %> <%= image_tag(" ", ) %>.

The webserver root directory is "/var/www" and our unstable application
is
under "/var/www/foo". Now..all of us has a working directory in
"/var/www/{user_name}/foo"  where we do our work...test it and finally
move
it to "/var/www/foo"( before that we move it to SVN :) )

Now...lets say i include a image using <img src="images/foo.jpg" > in my
copy of program and move this change to /var/www/foo, and assuming i
have
the file foo.jpg in /var/www/foo/public/images/ directory, the image
link
gets broken somehow. Now if i put <img src="../images/foo.jpg"> the link
will work from /var/www/foo also.

While..Rails way of including images,css work flawlessly, normal HTML
way of
including things break a little.Now...our designer a non ruby/rails
doesnt a
thing about them.

Any solution guys?
This topic is locked and can not be replied to.