# Ruby App as a Windows Service?

**URL:** <https://rubytalk.org/t/ruby-app-as-a-windows-service/28027>\
**Category:** ruby-talk\
**Created:** [6 June 2006 17:20 UTC](https://rubytalk.org/t/ruby-app-as-a-windows-service/28027 "2006-06-06T17:20:35Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![DEBAUN\_STEVE\_AG-Cont](https://avatars.discourse-cdn.com/v4/letter/d/d07c76/32.png) [@DEBAUN\_STEVE\_AG-Cont](https://rubytalk.org/u/DEBAUN_STEVE_AG-Cont)\
**Post date:** [6 June 2006 17:20 UTC](https://rubytalk.org/t/ruby-app-as-a-windows-service/28027/1 "2006-06-06T17:20:35Z")

</div>

I couldn't get win32-service to work. I ended up using Firedaemon.

If you use Firedaemon, you don't need to use RubyScript2Exe. Just have  
Firedaemon run: 'ruby c:\foo\bar.rb'

sd

> **···**
>
> > -----Original Message-----  
> > From: Daniel Berger [mailto:djberg96@gmail.com]  
> > Sent: Tuesday, June 06, 2006 10:13 AM  
> > To: ruby-talk@ruby-lang.org  
> > Subject: Re: Ruby App as a Windows Service?
> > 
> > Jim Freeze wrote:  
> > \> Hi  
> > \>  
> > \> This is a query for all those windows power users.  
> > \> I want to install a ruby app as a windows service.  
> > \>  
> > \> I am assuming that the best practice is to use RubyScript2Exe  
> > \> and something like [Winserv (@Sw4me)](http://www.sw4me.com/wiki/Winserv) or  
> > \> [http://www.firedaemon.com/](http://www.firedaemon.com/) to run the app as a service.  
> > \>  
> > \> Can someone with experience in doing this comment on  
> > \> my theories as how to proceed?  
> > \>  
> > \> Thanks  
> > You could use those, or use win32-service. 🙂
> > 
> > Regards,
> > 
> > Dan
> > 
> > This e-mail message may contain privileged and/or confidential  
> > information, and is intended to be received only by persons entitled to  
> > receive such information. If you have received this e-mail in error,  
> > please notify the sender immediately. Please delete it and all attachments  
> > from any servers, hard drives or any other media. Other use of this e-mail  
> > by you is strictly prohibited.  
> > All e-mails and attachments sent and received are subject to monitoring,  
> > reading and archival by Seminis. The recipient of this e-mail is solely  
> > responsible for checking for the presence of "Viruses" or other "Malware".  
> > Seminis accepts no liability for any damage caused by any such code  
> > transmitted by or accompanying this e-mail or any attachment.

---

<div class="post-metadata">

**Author:** ![Jim\_Freeze2](https://avatars.discourse-cdn.com/v4/letter/j/e480ec/32.png) [@Jim\_Freeze2](https://rubytalk.org/u/Jim_Freeze2)\
**Post date:** [6 June 2006 18:11 UTC](https://rubytalk.org/t/ruby-app-as-a-windows-service/28027/2 "2006-06-06T18:11:37Z")

</div>

These machines don't have ruby installed. I supposed I could use AllInOne  
Ruby, but I thought RubyScript2Exe would be easier.

Daniel

I saw win32-service, but have no idea how to use it. Can you provide an  
example.

Thanks

> **···**
>
> On 6/6/06, DEBAUN, STEVE [Seminis/2400] \<steve.debaun@seminis.com\> wrote:
> 
> > I couldn't get win32-service to work. I ended up using Firedaemon.
> > 
> > If you use Firedaemon, you don't need to use RubyScript2Exe. Just have  
> > Firedaemon run: 'ruby c:\foo\bar.rb'
> 
> --  
> Jim Freeze

---

<div class="post-metadata">

**Author:** ![James\_Cribbs](https://avatars.discourse-cdn.com/v4/letter/j/a88e57/32.png) [@James\_Cribbs](https://rubytalk.org/u/James_Cribbs)\
**Post date:** [6 June 2006 20:15 UTC](https://rubytalk.org/t/ruby-app-as-a-windows-service/28027/3 "2006-06-06T20:15:29Z")

</div>

Jim Freeze wrote:

> > I couldn't get win32-service to work. I ended up using Firedaemon.
> > 
> > If you use Firedaemon, you don't need to use RubyScript2Exe. Just have  
> > Firedaemon run: 'ruby c:\foo\bar.rb'
> 
> These machines don't have ruby installed. I supposed I could use AllInOne  
> Ruby, but I thought RubyScript2Exe would be easier.
> 
> Daniel
> 
> I saw win32-service, but have no idea how to use it. Can you provide an  
> example.

I want to second Daniel's suggestion to use win32-service. If no one else comes up with a better example, you are welcome to download KirbyBase (www.netpromi.com/kirbybase\_ruby.html) and check out an example usage. In the distribution, I have a fairly rudimentary script that turns the KirbyBase server script into a Windows service using win32-service. I have been running this process at my day job for several months now for a production application and it works flawlessly. Hats off to Daniel and the win32 utilities team!

Jamey Cribbs

> **···**
>
> > On 6/6/06, DEBAUN, STEVE [Seminis/2400] \<steve.debaun@seminis.com\> wrote:
