Hello,
I am developing a small website using mod_ruby + eruby, and I was wondering
if someone could help me. With regard to the ERuby.import, how do I avoid
specifying the absolute path name?
Say, I have the following files located in the document root: '/var/www/'
* index.rhtml
* header.rhtml
* footer.rhtml
In the first file (index.rhtml), I call:
* ERuby.import('header.rhtml')
* ERuby.import('footer.rhtml').
The above works fine. However, when I want to work on any files below the
document root, the only solution I could think of was this:
* ERuby.import(ENV['DOCUMENT_ROOT'] + 'header.rhtml')
I'm sorry if this question has been asked before, I did browse the mod_ruby
mailing list archives.
Thanks, Oliver.