On my local machine, i run rails with mongrel. I have some stuff which runs when it starts, via a file in config/initializers, which uses puts
to tell me which database it's using, what is being used to send emails, and a few other bits of info.
When I run a cluster of mongrels, on ports 3000, 3001 and 3002, I only want to do this reporting stuff for the mongrel on port 3000. So, I need to wrap it in an if
block which tests which port the currently running mongrel is using. Can anyone tell me how I can get this in my code?
uninitialized constant Rails::Server
- i don't suppose you know the Rails 2 equivalent? – Hackler