hemant
2006-Jun-03 11:55 UTC
[Rails] Strange Problem with inclusion of images and stylesheets
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? -- nothing much to talk -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060603/fccd37e7/attachment.html