From: "maikonaraujo@..." Date: 2007-06-04T05:45:26+09:00 Subject: Re: Singleton initilized twice On 3 jun, 13:59, Robert Klemme wrote: > On 03.06.2007 17:57, maikonara...@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 Tks, I was doing a hello worl only ehehe, and runing "ruby script/ server" on the prompt.