I need to run some code (a separate scheduled code) at startup but I don''t know which is the best place to put it, any hints? -- Lawrence http://www.oluyede.org/blog
Lawrence Oluyede wrote:>I need to run some code (a separate scheduled code) at startup but I >don''t know which is the best place to put it, any hints? > >In most cases, it will be either config/environment.rb or config/environments/production.rb Probably the latter, unless you want this code to also run when you launch unit tests or start an app for some poking around in development mode. -- Best regards, Alexey Verkhovsky Ruby Forum: http://ruby-forum.org (moderator) RForum: http://rforum.andreas-s.net (co-author) Instiki: http://instiki.org (maintainer)
2005/5/19, Alexey Verkhovsky <alex-vV7tgcE2N9Nhl2p70BpVqQ@public.gmane.org>:> In most cases, it will be either config/environment.rb or > config/environments/production.rb > > Probably the latter, unless you want this code to also run when you > launch unit tests or start an app for some poking around in development > mode.I''d like to start it in in dev and production mode and also to test it. Thanks for the hint -- Lawrence http://www.oluyede.org/blog