Using win32-service

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?!!!

On Oct 2, 12:35 pm, ahappydeath [email protected] wrote:

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

ahappydeath wrote:

On Oct 2, 12:35�pm, ahappydeath [email protected] wrote:

also maybe i should mention… I just installed SP3

Did it work before you installed SP3?

On Oct 2, 7:25 pm, James D. [email protected] wrote:

ahappydeath wrote:

On Oct 2, 12:35 pm, ahappydeath [email protected] wrote:

also maybe i should mention… I just installed SP3

Did it work before you installed SP3?

Posted viahttp://www.ruby-forum.com/.

I should have been more clear… I never tried it on SP2.