using win32-service

A

ahappydeath

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

ahappydeath

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Staff online

Members online

Forum statistics

Threads
474,342
Messages
2,571,409
Members
48,798
Latest member
massivestack

Latest Threads

Top