# Why my ruby services shuts down when logoff from windows

**URL:** <https://www.ruby-forum.com/t/why-my-ruby-services-shuts-down-when-logoff-from-windows/91908>\
**Category:** Ruby\
**Created:** [April 13, 2007, 9:53am UTC](https://www.ruby-forum.com/t/why-my-ruby-services-shuts-down-when-logoff-from-windows/91908 "2007-04-13T09:53:07Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Miika\_Parvio](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/m/96bed5/32.png) [@Miika\_Parvio](https://www.ruby-forum.com/u/Miika_Parvio)\
**Post date:** [April 13, 2007, 9:53am UTC](https://www.ruby-forum.com/t/why-my-ruby-services-shuts-down-when-logoff-from-windows/91908/1 "2007-04-13T09:53:07Z")

</div>

Hello!

I have problems with services created on ruby tools. I’m using mongrel  
web server

I’m creating mongrel weg server service in following way:

rails\_path = File.expand\_path(File.dirname( **FILE** ) + “/…”).gsub("/",  
“\”)  
port = 80  
sh("mongrel\_rails.cmd service::install " +  
"-N my\_mongler\_web\_server " +  
"-c “#{rails\_path}” " +  
"-p #{port} " +  
“-e #{rails\_env}”

Everything goes fine, but when I logout from the windows (Windows XP  
pro), service I created shuts down. How I can prevent this?

Also my other ruby services shuts down, when I logoff from windows. How  
can I prevent this? I have used win32/Service to create services from my  
ruby applications.

Miika
