i am struggling with this daemon gem and cannot get it to work. any
help is appreciated.
E:\TradingTools\Development\app\helpers>ruby myserver_control.rb start
e:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/daemons/daemonize.rb:
103:in fork': the fork() function is unimplemente d on this machine (NotImplementedError) from e:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/daemons/ daemonize.rb:103:in
safefork’
from e:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/daemons/
daemonize.rb:203:in daemonize' from e:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/daemons/ application.rb:115:in
start_load’
from e:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/daemons/
application.rb:236:in start' from e:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/daemons/ controller.rb:69:in
run’
from e:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/
daemons.rb:136:in run' from e:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/daemons/ cmdline.rb:105:in
call’
from e:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/daemons/
cmdline.rb:105:in catch_exceptions' from e:/ruby/lib/ruby/gems/1.8/gems/daemons-1.0.9/lib/ daemons.rb:135:in
run’
from myserver_control.rb:6
this is myserver_control.rb
require ‘rubygems’ # if you use RubyGems
require ‘daemons’
Daemons.run(‘myserver.rb’)
this is myserver.rb
it does nothing really useful at the moment
loop do
sleep(5)
end