Forum: Ferret Launching DRb server on reboot: solved

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Sean B. (Guest)
on 2007-04-23 05:57
(Received via mailing list)
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
Jens K. (Guest)
on 2007-04-23 11:58
(Received via mailing list)
Cool.

Mind adding the script and the info about the path issue to the aaf wiki
[1] for further reference ?

Thanks,
Jens

[1] http://projects.jkraemer.net/acts_as_ferret

On Sun, Apr 22, 2007 at 09:57:01PM -0400, Sean B. wrote:
> #!/bin/bash
>
>       echo "Stopping ferret DRb server."
> cd $CURDIR
> _______________________________________________
> Ferret-talk mailing list
> removed_email_address@domain.invalid
> http://rubyforge.org/mailman/listinfo/ferret-talk
>

--
Jens Krämer
webit! Gesellschaft für neue Medien mbH
Schnorrstraße 76 | 01069 Dresden
Telefon +49 351 46766-0 | Telefax +49 351 46766-66
removed_email_address@domain.invalid | www.webit.de

Amtsgericht Dresden | HRB 15422
GF Sven Haubold, Hagen Malessa
This topic is locked and can not be replied to.