The problem with getting DRb to luanch on reboot is the same problem
causing some people to ahve trouble getting mongrel clustersw to come
back up on reboot. The problem is the PATH. ON many new RH
distributions running SELinux, /usr/local/bin is not added to the PATH
until reboot is complete. Therefore, those of having installed ruby
in /usr/local/bin run in to issues. SO, hoping to save someone else a
bit of their sanity, simply adding PATH=/usr/local/bin:$PATH to your
actual ferret DRb startup script will do the trick. Here’s our entire
startup script:
#!/bin/bash
This script starts and stops the ferret DRb server
chkconfig: 2345 89 36
description: Ferret search engine for ruby apps.
save the current directory
CURDIR=pwd
PATH=/usr/local/bin:$PATH
RORPATH="/path/to/ror_root"
case “$1” in
start)
cd $RORPATH
echo “Starting ferret DRb server.”
FERRET_USE_LOCAL_INDEX=1
script/runner -e production
vendor/plugins/acts_as_ferret/script/ferret_start
;;
stop)
cd $RORPATH
echo “Stopping ferret DRb server.”
FERRET_USE_LOCAL_INDEX=1
script/runner -e production
vendor/plugins/acts_as_ferret/script/ferret_stop
;;
*)
echo $“Usage: $0 {start, stop}”
exit 1
;;
esac
cd $CURDIR