Index: [Article Count Order] [Thread]

Date:  Tue, 02 Nov 2004 17:58:50 +0100
From:  Simon Leidig <Simon.Leidig@...>
Subject:  Re: include problem
To:  modruby@... (modruby ML)
Message-Id:  <4187BCCA.60307@...>
In-Reply-To:  <416C0247.4070001@...>
References:  <41584A73.40408@...> <416C0247.4070001@...>
X-Mail-Count: 01343

Hi,

I've finally come up with a solution that was too obvious to see: the 
relative paths in 'require' were not interpreted from the document's 
location as I foolishly expected. So now I'm using absolute paths:

   require Apache::request.server().document_root().untaint +
           '/rb/tools.rb'

instead of

   require '../rb/tools.rb'


Everything seems to work now, but I still get that strange warning:
"main#include in the wrapped load is effective only for toplevel"
No idea what that could mean.


Shugo Maeda wrote:
> Do you run virtual hosts on same Apache processes?
> If so the ruby interpreter is shared by all virtual hosts.
> This may cause problems.

Yes, we do. I avoid namespace collisions by putting everything into 
modules with unique names. Do you know of any other possible problems?


Thanks a lot,
Simon