Index: [Article Count Order] [Thread]

Date:  Thu, 11 Nov 2004 18:24:57 +0100
From:  Simon Leidig <Simon.Leidig@...>
Subject:  Re: include problem
To:  modruby@... (modruby ML)
Message-Id:  <4193A069.6060804@...>
In-Reply-To:  <4187BCCA.60307@...>
References:  <41584A73.40408@...> <416C0247.4070001@...> <4187BCCA.60307@...>
X-Mail-Count: 01344

Hi,

>> 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?

well, using modules to create separate namespaces *seemed* to work, but 
I was just lucky (or rather unlucky) during testing. In fact, 
approximately one out of 20 forked Apache processes still confused the 
namespaces. I couldn't believe it and tested it again and again, so now 
there's no doubt for me that module-based namespaces really don't work, 
even when using different modules within only one virtual host. Please 
mail me if you want to have my test files and verify my results.

As a workaround, I now put everything into classes with unique names and 
instantiate them in the *.rhtml pages. But this is of course something 
very different from my initial intention.


Cheers,
Simon