Hello there,
I installed the ruby gem Daemons. To make sure it was working I created a script that would print to a file every 5 seconds. I then created another file to run the script using the trivial example they give you in the readme located at http://daemons.rubyforge.org/ . I require both rubygems and daemons. Then I type 'ruby mycontrol.rb start'. The example they use has some type of message saying '(myserver.rb is now running in the background)', I don't see that, but I don't get any errors. If I do a 'ps -u myusername' I see that the filed to be daemonized is listed in the processes, but doesn't appear to be running as nothing is getting written to the file.
Here is my source:
# this is mycontrol.rb
require 'rubygems'
require 'daemons'
Daemons.run(daemon.rb)
and...
# this is daemon.rb
loop do
open('file.out', 'w') do |f|
f.puts 'hello everybody'
end
sleep(3)
end
Does anything I'm doing jump out at you as being wrong?
Thanks, Tony