Starting ruby script on server's reboot


I'm using passenger + apache.
with this combination, how can I start my ruby script on server's
now I type "ruby myscript.rb run" whenever server reboot.

Like anything else -- invoke it from a script in /etc/init.d .

(That is, of course, assuming *nix -- Windows, no idea)

you can add your script to the cron tab
take a look at this screencast


Most modern crontab specifications support a @reboot meta-schedule.

A job tagged

@reboot /usr/bin/ruby /path/to/your/script.rb run

would run whenever the machine restarted.