[Mongrel] Capistrano mongrel recipes and /usr/local/bin

Nicolas St-Laurent nstlaurent at wantedtech.com
Mon Jul 9 16:11:40 EDT 2007

Le 07-07-09 à 15:34, Wayne E. Seguin a écrit :

> On Jul 09, 2007, at 15:18 , Nicolas St-Laurent wrote:
>> Thanks for your feedback.
>> Well, /usr/local/bin is already in user's path. But since PATH is
>> define in /etc/profile, it ain't define when a subshell is started,
>> hence a run "echo $PATH" gives the default path :
>> /usr/bin:/bin:/usr/sbin:/sbin
>> I certainly miss something, but I doesn't know what. I'm on SuSE
>> Entreprise 64bits, but I've got the same issue on Mac OS X, Ubuntu or
>> Debian.
> You are most welcome.
> Usually you'd put your path extensions inside .bash_profile  
> or .bash_rc like so:
> PATH=/usr/local/bin:$PATH
> Then, when you login next it should be sourced (or you can do  
> manually via "source ~/.bash_profile" for the current session) you  
> should see this:
> > echo $PATH
> /usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin
> ( assuming that "echo $PATH" originally produces: /usr/bin:/bin:/ 
> usr/sbin:/sbin )
> In this example /usr/local/bin will be searched first, of course  
> you can set it last also by appending instead of prepending.
> Let me know if this helps.

Well, not really. I already set my path correctly. When I'm ssh  
logged with the user I use for my capistrano deployment, my path is :


But, it goes to :

>> /usr/bin:/bin:/usr/sbin:/sbin

in Capistrano's run method.

bash_rc and bash_profile doesn't do the same job in Bash. bash_rc is  
sourced everytime a shell is started while profile is sourced only on  

My path is define in /etc/profile instead of locally in user account  
so that every users got almost the same path. It's the default  
setting on a Suse distro.

Since Mongrel's recipes use a send(run_method, "cmd") and other  
Mongrel users should have the same issue, I was asking on this  
mailing list. I will ask on Capistrano mailing list.

Thanks for your time,


More information about the Mongrel-users mailing list