Hi Stewart,

I'm using this in my deployment file :
default_environment["PATH"] = "/opt/ruby-enterprise/bin:/usr/bin:/bin:/
usr/sbin:/sbin"

And it works like a charm :)

Cheers
Olivier

On Sep 6, 6:54 am, Stewart <[email protected]> wrote:
> Hi,
>
> Currently trying to deploy with cap. I want to set a different PATH
> value for cap to use when its logging in to my server. The deployment
> user is picking up the wrong path. I have taken the following steps to
> fix this problem but issue remains
>
> 1. Edited the /etc/ssh/sshd_config file and added the following line
>
> PermitUserEnvironment yes
>
> 2. Added the PATH line to ~/.ssh/environment
>
> dep...@stewart:~$ cat .ssh/environment
> PATH="/opt/ruby-enterprise-1.8.7-2010.02/bin"
>
> However I still have the following issue
>
> ~/code/rails/app (deployment)$ cap invoke COMMAND="which ruby"
>   * executing `invoke'
>   * executing "which ruby"
>     servers: ["app.net"]
> Password:
>     [app.net:33323] executing command
>  ** [out :: app.net:33323] /usr/bin/ruby
>     command finished
>
> Any suggestions on what is wrong?
>
> ~/code/rails/app (deployment)$ ruby -v
> ruby 1.8.7 (2009-06-12 patchlevel 174) [i686-darwin9.8.0]
>
> ~/code/rails/app (deployment)$ cap --version
> Capistrano v2.5.19
>
> Thanks in advance for any help you might be able to offer. There is
> every chance I have done something stupid with this. I am quite tired
> now. :)
>
> Regards
>
> PS: I also tried setting the path in .bashrc .bash_profile
> and .bash_login for the deploy user  but i read that these don't get
> executed by cap. Just thought I would let you know.

-- 
* You received this message because you are subscribed to the Google Groups 
"Capistrano" group.
* To post to this group, send email to [email protected]
* To unsubscribe from this group, send email to 
[email protected] For more options, visit this group at 
http://groups.google.com/group/capistrano?hl=en

Reply via email to