From: Robert Klemme Date: 2007-06-04T02:00:28+09:00 Subject: Re: Singleton initilized twice On 03.06.2007 17:57, maikonaraujo@gmail.com wrote: > I have a little problem here, I am doing a webserver and I put some > calculations on the singleton's initialization and call the methods fo > this class to do some calculations for me (no active record, just > memory). The problem is the singleton is initilizing every method api > from webserver I call. > Can someone explain how can I solve this problem? Sounds like you are using CGI and thus your singleton is initialized once for each CGI process. You need to find another mechanism to hold your singleton - either you use FastCGI or mod-ruby or you create a server process that is connected to via DRb from your CGI processes. Kind regards robert