[Mongrel] Win32 Service Commands Missing?
luislavena at gmail.com
Fri Feb 2 17:04:25 EST 2007
On 2/2/07, Alan Maszt <alan_maszt at yahoo.com> wrote:
> I've upgraded from version 0.3.13.3 to 1.0.1 (along with dependencies). I can see service::install and service::remove commands, but not service::start and service::stop. Moreover, after installing the service with service::install, the service shows up on the list in Control Panel/Administrative Tools/Services, but fails to start from there.
Could you Copy&Paste the command line used to install the service?
A mandatory parameter is -c (chdir) so mongrel_service will know where
to find your rails application
Also, if the service was installed with previous versions of service::
command, remove it and recreate, the syntax passed to the service
(And remember remove the prior version of mongrel_service also, could
show up conflicts).
You could try if your rails application start properly doing:
mongrel_service console single [your mongrel_rails params]
mongrel_service console single -c "C:/My Rails App" -p 4000 -e production
> 1. Unless the documentation on the website is obsolete. I'd expect service::start and service::stop to be available.
I posted several weeks ago (plugin beta of mongrel_service) that
::start and ::stop were replaced by plain simple "net start
service_name" (less keystrokes):
"mongrel_rails service::start -N myservice".length
"net start myservice".length
> 2. The whole thing seems to be caused by mongrel_service 0.3.1 mswin32. If I revert to the previous version (0.1 ruby) the missing options show up and the service starts even with mongrel 1.0.1.
Beside the start/stop missing from service stuff, there are more
important things that differ between both versions:
1) The new service process is not Ruby based, but a 3rd party
executable that spawn your mongrel_rails (and your rails application).
This is the safest scenario, no win32-service native threading mixing
with ruby green threads (that often caused the services to fail on
2) Not injecting stuff into your mongrel+rails process benefits you,
reducing possible point of failure due faulty code committed by me in
a 48hs hacking session.
I'll update the docs when return to office, so next time zed publish
the site will be correct.
Leaders are made, they are not born. They are made by hard effort,
which is the price which all of us must pay to achieve any goal that
More information about the Mongrel-users