From: ahappydeath Date: 2008-10-03T02:18:46+09:00 Subject: Re: using win32-service On Oct 2, 12:35 pm, ahappydeath wrote: > I am trying to create a windows service with Ruby. I have successfully > created the service ( I can open up the services and see the service I > created ) but when I try to start it I get the error message: >                             "Could not start A Ruby Service(the name I > gave it) on Local Computer. >                               Error 1053: The service did not respond > to the start or control request in a timely fashion" > > I have the executable of the service pointed to the full path of "ruby > c:\service.rb"  and the contents of service.rb are: > > require 'win32/daemon' > include Win32 > > class Daemon > >   def service_main() >                 while running? >                         sleep 3 >                         File.open("c:\\test.log", "a") { |f| f.puts "service is running"} >                 end >   end > > def service_stop >      exit! >  end > > end > > Daemon.mainloop > > any ideas what I'm doing wrong?!!! also maybe i should mention... I just installed SP3