# Problem with win32 service for mongrel (vista)

**URL:** <https://www.ruby-forum.com/t/problem-with-win32-service-for-mongrel-vista/117916>\
**Category:** Rails\
**Created:** [October 22, 2007, 12:47pm UTC](https://www.ruby-forum.com/t/problem-with-win32-service-for-mongrel-vista/117916 "2007-10-22T12:47:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@stefan](https://www.ruby-forum.com/u/stefan)\
**Post date:** [October 22, 2007, 12:47pm UTC](https://www.ruby-forum.com/t/problem-with-win32-service-for-mongrel-vista/117916/1 "2007-10-22T12:47:34Z")

</div>

Hi,  
I tried to install the win32 service for mongrel with the following  
commands:

> gem install win32-service (win32-service 0.5.2 mswin32)  
> gem install mongrel\_service (mongrel\_service 0.3.2 (mswin32)

> mongrel\_rails service::install -N appname -c c:\appdir -p 3000 - e development

The service is installed.  
I can see the service in the service console in windows (windows  
vista).  
When I try to start the service from the service console or I get the  
following message:

The appname service on Local Computer started and then stopped. Some  
services stop automatically if they are not in use by other services  
or programs.

When I use net start to start the service the response I get is:  
The appname service is starting.  
The appname service could not be started.

The service did not report an error.

Any ideas?

---

<div class="post-metadata">

**Author:** ![stefan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@stefan](https://www.ruby-forum.com/u/stefan)\
**Post date:** [October 22, 2007, 12:52pm UTC](https://www.ruby-forum.com/t/problem-with-win32-service-for-mongrel-vista/117916/2 "2007-10-22T12:52:15Z")

</div>

Hi Stefan

> The appname service on Local Computer started and then stopped. Some  
> services stop automatically if they are not in use by other services  
> or programs.

cch: I had come accross this message before when I first started to  
use mongrel\_service.  
Check your path and make sure your appdir is a valid rails apps.

---

<div class="post-metadata">

**Author:** ![stefan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@stefan](https://www.ruby-forum.com/u/stefan)\
**Post date:** [October 25, 2007, 10:55am UTC](https://www.ruby-forum.com/t/problem-with-win32-service-for-mongrel-vista/117916/3 "2007-10-25T10:55:00Z")

</div>

I have its running just fine.  
So it does work.

---

<div class="post-metadata">

**Author:** ![stefan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@stefan](https://www.ruby-forum.com/u/stefan)\
**Post date:** [October 25, 2007, 2:29pm UTC](https://www.ruby-forum.com/t/problem-with-win32-service-for-mongrel-vista/117916/4 "2007-10-25T14:29:45Z")

</div>

99% of the time it’s because your app is misconfigured or that port is  
in  
use.

Start up your app like this from the website root:

mongrel\_rails start -e production -p 4003

Then hit up [http://localhost:4003](http://localhost:4003)

Test your app.

Then install the service

mongrel\_rails service::install -n my\_app\_on\_4003 -e production -p 4003

Then see if it starts

mongrel\_rails service::start -n my\_app\_on\_4003

Let us know what you find.
