[Mongrel] Capistrano mongrel recipes and /usr/local/bin
jonathan.tron.mailings at gmail.com
Tue Jul 10 14:52:57 EDT 2007
Le 9 juil. 07 à 18:06, Nicolas St-Laurent a écrit :
> I'm trying to deploy my application with Capistrano using Mongrel
> recipes. Since I've installed Ruby from source code, mongrel scripts
> are found in /usr/local/bin. But the recipes can't find
> mongrel_rails : "bash: mongrel_rails: command not found". The path of
> the user account used to deploy is OK. For sure, I can redefine
> tasks in the recipes to add path before calling mongrel_rails.
> Any idea of a better solution ?
I experienced the same problem, it comes from two things : sshd and
SSHd (at least on Suse Linux Entreprise Servers 10.1) is compiled and
configured to have a really basic path defined and
PermitUserEnvironment set to "no", if you combined that with
capistrano not using any environment variables, you get your problem.
One solution is to set PermitUserEnvironment to "yes" in sshd_config
and use ~/.ssh/environment file to set a path containing your
mongrel_rails command (in your deployment user home). But be aware
there are some security risks setting this variable to "yes".
Hopes this help.
More information about the Mongrel-users