David Vrensk wrote:
> On Mon, Sep 15, 2008 at 4:44 AM, Steve Meyer <li...@ruby-forum.com> 
> wrote:
> 
>> I've attempted to configure mongrel to start as a service in RHEL.
>> I've copied mongrel_cluster to /etc/init.d and
>> "#/etc/init.d/mongrel_cluster start" does work. However when I attempt
>> to start mongrel_cluster using "service mongrel_cluster start" I get the
>> following error:
>>  service mongrel_cluster start
>> /usr/bin/env: ruby: No such file or directory
> 
> 
> "service" gives a better picture of what will happen on boot since it 
> sets
> up the environment as it would be for the init process that runs all the
> little start scripts.  In this case, it looks like ruby is not in the
> default path.  Read the man-page for 'service' for a little more 
> information
> and try creating a simple script in /etc/init.d that just prints out the
> environment variables, like this (untested):
> 
> ---------------8<--------
> #! /bin/sh
> env
> -------------8<---------
> 
> Make it executable and run it with "service name_of_script start" to see
> what it prints.  It's not the solution to your problem, but it's a 
> start.
> 
> /David

I did get past this but now the "service mongrel_cluster" fails with the 
following; (i've added the env command to the script)
service mongrel_cluster start
TERM=xterm
PATH=/sbin:/usr/sbin:/bin:/usr/bin
PWD=/
LANG=en_US.UTF-8
SHLVL=1
_=/bin/env
/usr/bin/mongrel_cluster_ctl:9:in `require': no such file to load -- 
rubygems (LoadError)
        from /usr/bin/mongrel_cluster_ctl:9

While /init.d/mongrel_cluster start works and the env info is;
SHELL=/bin/bash
TERM=xterm
HISTSIZE=1000
USER=sfcapp
LS_COLORS=no=00:fi=00:di=00;34:ln=00;36:pi=40;33:so=00;35:bd=40;33;01:cd=40;33;01:or=01;05;37;41:mi=01;05;37;41:ex=00;32:*.cmd=00;32:*.exe=00;32:*.com=00;32:*.btm=00;32:*.bat=00;32:*.sh=00;32:*.csh=00;32:*.tar=00;31:*.tgz=00;31:*.arj=00;31:*.taz=00;31:*.lzh=00;31:*.zip=00;31:*.z=00;31:*.Z=00;31:*.gz=00;31:*.bz2=00;31:*.bz=00;31:*.tz=00;31:*.rpm=00;31:*.cpio=00;31:*.jpg=00;35:*.gif=00;35:*.bmp=00;35:*.xbm=00;35:*.xpm=00;35:*.png=00;35:*.tif=00;35:
PATH=/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin
MAIL=/var/spool/mail/root
PWD=/etc/init.d
INPUTRC=/etc/inputrc
LANG=en_US.UTF-8
SSH_ASKPASS=/usr/libexec/openssh/gnome-ssh-askpass
HOME=/root
SHLVL=2
LOGNAME=root
CVS_RSH=ssh
SSH_CONNECTION=9.65.247.187 3708 9.54.168.71 22
LESSOPEN=|/usr/bin/lesspipe.sh %s
G_BROKEN_FILENAMES=1
_=/bin/env

I have tried adding /usr/local/bin to the path; didn't work

-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
Mongrel-users mailing list
Mongrel-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/mongrel-users

Reply via email to