sh: mongrel_rails: command not found

94 views
Skip to first unread message

Trevor Turk

unread,
Jul 23, 2007, 10:55:30 PM7/23/07
to Capistrano
Does anyone have an idea what's wrong with this capistrano restart
task?

http://pastie.caboo.se/81631

I'm getting this error:
sh: mongrel_rails: command not found
command "mongrel_rails cluster::stop -C /home/.../mongrel_cluster.yml"
failed on ...

When I run the command via SSH, it works just fine - but for some
reason not from within Capistrano. So, now I have to SSH onto the
server to restart the mongrels :(

Any ideas? Thanks in advance.

Tim Carey-Smith

unread,
Jul 23, 2007, 11:00:20 PM7/23/07
to capis...@googlegroups.com
* Trevor Turk <trevo...@gmail.com> [2007-07-24 02:55:30 -0000]:

It is probably a PATH problem. Depending on where your mongrel_rails
executable is located, you should be able to set
default_environment["PATH"] to something specific to your servers.

Tim

Trevor Turk

unread,
Jul 23, 2007, 11:42:59 PM7/23/07
to Capistrano
Thanks, Tim.

I found these posts thanks to your suggestion.

http://groups.google.com/group/capistrano/browse_thread/thread/ff1bc38b8f3ce59e/
http://groups.google.com/group/capistrano/browse_thread/thread/f040e08c415984b5/

I updated my task like so:

http://pastie.caboo.se/81639

I added the path to the beginning of the command.
run "/var/lib/gems/1.8/bin/mongrel_rails..."

But now I'm getting a different error:
http://pastie.caboo.se/81640

And using something similar to this:
set :mongrel_rails, '/path/to/your/bin/mongrel_rails'

Didn't seem to get me anywhere. I'll keep trying that route, though.

Any other ideas would be a help.

Thanks,
- Trevor

Reply all
Reply to author
Forward
0 new messages