Mongrel_rails command only runs from within apps directory

ok so when I run

mongrel_rails cluster::start -C /path/to/config/file from anywhere on
my server, I get this error message.

Restarting 2 Mongrel servers…
!!! PID file log/mongrel.8000.pid does not exist. Not running?
mongrel::restart reported an error. Use mongrel_rails mongrel::restart
-h to get help.
mongrel_rails restart -P log/mongrel.8000.pid

!!! PID file log/mongrel.8001.pid does not exist. Not running?
mongrel::restart reported an error. Use mongrel_rails mongrel::restart
-h to get help.
mongrel_rails restart -P log/mongrel.8001.pid

But when I run the command

mongrel_rails cluster::start

from within the apps directory it works as it should.

So this means that capistrano cannot restart the mongrel processes on
deploy, AND mongrel isnt starting up when my server reboots. I have to
manually go into both of my apps to start up the processes.

Any suggestions?

I think it happens with pre 1.0 Mongrel. When I upgraded to 1.0.1.
version and created configuration file again it added cwd: /home/myapp/
current to start of YAML file. Then all worked as expected.

Hmm that makes sense. I upgraded to the 1.01 mongrel, so you’re saying
I have to re-create my mongrel file?

Likely you need to add…

pid_file: /path/to/your/pid_files

into your config YAML, the error is that mongrel command isn’t
locating the pid file

which it is trying to locate by relative location since no pid_file
path was provided.

I don’t think the problem is related to the mongrel version.

/ak

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs