Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Daemons lib not dong much?...

Thread Tools

Daemons lib not dong much?...

sa 125
Posts: n/a
Hello - I'm trying to run a background daemon that will monitor changes
in a mysql database. The file to monitor the changes works fine when run
by itself from the prompt as
$ ruby changes.rb

However, when I try to use it in a daemon file, not much happens. Here's
the file (changes_daemon.rb):

require 'daemons'
# all the other required come here

def main

if __FILE__ == $0

When I run this at the prompt:
$ruby changes_daemon.rb start
$ (next shell line after hitting return - no errors)

Nothing happens (it's supposed to write to a table and a log file, so I
can see if anything occurs).

Any insights will be great - thanks!
Posted via

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Cops Shoot Ding-Dong in the Face! Bucky Breeder Computer Support 0 06-09-2010 01:24 PM
Re: Ding Dong... Prince Vlad Tepes Computer Support 0 02-04-2007 09:57 AM
install_driver(Oracle) failed: Can't load 'C:/Perl/site/lib/auto/DBD/Oracle/Oracle.dll' for module DBD::Oracle: load_file:The specified procedure could not be found at C:/Perl/lib/ line 230. Feyruz Perl Misc 4 10-14-2005 06:47 PM
DVD Verdict reviews: HAPPY LESSON: MAMA-LAMA-DING-DONG (VOLUME 3) and more! DVD Verdict DVD Video 0 05-20-2004 09:05 AM
find th dong you want nate Computer Support 11 04-11-2004 03:14 AM