webrick daemon
require 'tempfile' require 'webrick' WEBrick::Daemon.start do log = Tempfile.new('daemon.log') loop do log.puts "I'm a daemon, doin' daemon things." log.flush sleep 5 end end