# Starting Mongrel as Windows service

**URL:** <https://www.ruby-forum.com/t/starting-mongrel-as-windows-service/142444>\
**Category:** Mongrel\
**Created:** [July 8, 2008, 1:51am UTC](https://www.ruby-forum.com/t/starting-mongrel-as-windows-service/142444 "2008-07-08T01:51:38Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![jturney](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e99b99/32.png) [@jturney](https://www.ruby-forum.com/u/jturney)\
**Post date:** [July 8, 2008, 1:51am UTC](https://www.ruby-forum.com/t/starting-mongrel-as-windows-service/142444/1 "2008-07-08T01:51:38Z")

</div>

Hi, I’m very new to Mongrel and RoR.

I found this command:

$ mongrel\_rails\_service install -n blog -r c:\data\blog   
-p 4000 -e production

But I’m not sure if I’m suppose to modify any of those  
commands. Or should I just press enter and leave it as is?

Thanks!

---

<div class="post-metadata">

**Author:** ![jturney](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e99b99/32.png) [@jturney](https://www.ruby-forum.com/u/jturney)\
**Post date:** [July 8, 2008, 9:28am UTC](https://www.ruby-forum.com/t/starting-mongrel-as-windows-service/142444/2 "2008-07-08T09:28:11Z")

</div>

On Tue, Jul 8, 2008 at 1:51 AM, Justin To [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Hi, I’m very new to Mongrel and RoR.
> 
> I found this command:
> 
> $ mongrel\_rails\_service install -n blog -r c:\data\blog   
> -p 4000 -e production
> 
> But I’m not sure if I’m suppose to modify any of those  
> commands. Or should I just press enter and leave it as is?

Hello Justin.

Dunno where you found those commands, but they are not up to date.

This page contains more actual information:

[http://mongrel.rubyforge.org/wiki/Win32](http://mongrel.rubyforge.org/wiki/Win32)

1. To install a service, from the root of your rails application, do  
this:

mongrel\_rails service::install -N blog

That will create a “blog” service that you can start or stop using net  
commands:

net start blog  
net stop blog

1. To remove the service, only do this:

mongrel\_rails service:remove -N blog

Notice the use of uppercase N, that changed some time ago due a clash  
of parameters between service and cluster. Now is N.

> Thanks!

## HTH,

## Luis L. AREA 17

Human beings, who are almost unique in having the ability to learn from  
the experience of others, are also remarkable for their apparent  
disinclination to do so.  
Douglas Adams

---

<div class="post-metadata">

**Author:** ![jturney](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e99b99/32.png) [@jturney](https://www.ruby-forum.com/u/jturney)\
**Post date:** [July 8, 2008, 5:57pm UTC](https://www.ruby-forum.com/t/starting-mongrel-as-windows-service/142444/3 "2008-07-08T17:57:01Z")

</div>

Thanks for the help Luis.

However, I was a little confused since you said I must use:

mongrel\_rails service::install -N blog

while the link you gave me says:

mongrel\_rails service::install -N myapp   
-c c:\my\path\to\myapp -p 4000 -e production

What do the extra parameters do?

Thanks!!

---

<div class="post-metadata">

**Author:** ![jturney](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e99b99/32.png) [@jturney](https://www.ruby-forum.com/u/jturney)\
**Post date:** [July 8, 2008, 6:42pm UTC](https://www.ruby-forum.com/t/starting-mongrel-as-windows-service/142444/4 "2008-07-08T18:42:23Z")

</div>

On Tue, Jul 8, 2008 at 5:57 PM, Justin To [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> What do the extra parameters do?

you can check for yourself:

mongrel\_rails service::install -h

that will give you a detailed list of what means each one.

You can use the -c one if you want to install the service from outside  
your RAILS\_ROOT.

> Thanks!!

You can look for the other ones: port and environment 🙂

## HTH,

## Luis L. AREA 17

Human beings, who are almost unique in having the ability to learn from  
the experience of others, are also remarkable for their apparent  
disinclination to do so.  
Douglas Adams
