this writes to the registry, it also executes the the file as a service
which confuses me because i dont see Service.start anywhere and the
process only last for like 10…
the reason it only last for a few seconds, The service did not respond
to the start or control request in a timely fashion… sounds simple
right? so, i need to add code to the rscript.exe
require “rubygems”
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”
}
# my program will do stuff here ? ? ? Right ???
end
end
def service_stop
exit!
end
end
Daemon.mainloop
this script wont compile with rubyscript2exe
I need my executable to communicate with the service manager… this
daemon script wont compile so now im stumped… idk what else to try…
if you are using gem version 1.3, Rubyscript2exe doesn’t work anymore
with this version. Try to downgrade if that’s the case otherwise try
using OCRA it does the same as Rubyscript2exe.
if you are using gem version 1.3, Rubyscript2exe doesn’t work anymore
with this version. Try to downgrade if that’s the case otherwise try
using OCRA it does the same as Rubyscript2exe.
Cheers
ok, i found my problem… ruby2exe and ocra work just fine… I dont
know how to properly install gems and library’s… im not sure were the
correct download is for this daemon lib is…
C:\Users\BiGMaC>irb
irb(main):001:0> require ‘win32/daemon’
LoadError: no such file to load – win32/daemon
from (irb):1:in `require’
from (irb):1
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.