# Another win32 service error

**URL:** <https://www.ruby-forum.com/t/another-win32-service-error/130165>\
**Category:** Ruby\
**Created:** [February 26, 2008, 12:25am UTC](https://www.ruby-forum.com/t/another-win32-service-error/130165 "2008-02-26T00:25:51Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Junkone](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/e274bd/32.png) [@Junkone](https://www.ruby-forum.com/u/Junkone)\
**Post date:** [February 26, 2008, 12:25am UTC](https://www.ruby-forum.com/t/another-win32-service-error/130165/1 "2008-02-26T00:25:51Z")

</div>

Is there anything that my executable should do in order to be a  
service. i have created services before with vb and have not  
experienced issues. bat file is a simple one having this statemetn.  
thin start -e production -p 3000

When i run it directly, it works. but i run it as part of the  
servicem, the start up fails with this error

This is some service service failed to start due to the following  
error:  
The service did not respond to the start or control request in a  
timely fashion.

My code for the service implementation is

require “win32/service”  
include Win32

# Create a new service

Service.create(‘some\_service’, nil,  
:service\_type =\> Service::WIN32\_OWN\_PROCESS,  
:description =\> ‘A custom service I wrote just for fun’,  
:start\_type =\> Service::AUTO\_START,  
:error\_control =\> Service::ERROR\_NORMAL,  
:binary\_path\_name =\> ‘E:\TradingTools\torontotrader  
\startServer.bat’,  
:load\_order\_group =\> nil,  
:dependencies =\> nil,  
:service\_start\_name =\> ‘LocalSystem’,  
:password =\> nil,  
:display\_name =\> ‘This is some service’  
)
