I changed the path in /etc/profile (which is run for ALL connecting
users, including the one that Capistrano is using). It still doesn't
work, but I'll move on. Where would I put the
default_environment["PATH"] = ... command? in deploy.rb?
Thanks.
And yes, deploy.rb is where you set default_environment.
- Jamis
> > > If you have non-standard paths that
> > > you want Capistrano to use, you need to set them via something like
> > > the default_environment hash:
>
> > > default_environment["PATH"] = "/path/one:/path/two:/path/three"
>
> > I changed thepathin /etc/profile (which is run for ALL connecting
> > users, including the one that Capistrano is using). It still doesn't
> > work, but I'll move on. Where would I put the
> > default_environment["PATH"] = ... command? in deploy.rb?
>
> > Thanks.
I can't seem to get that default_environment["PATH"] setting to work.
Does it look just like that in a capfile?
default_environment["PATH"] = "/asdf:/asdf/asdf"
But, to your reply, I have found this to work. I would rather not
have to set this up on each machine though.
in sshd_config, change this line
#PermitUserEnvironment no
TO
PermitUserEnvironment yes
Then for the user you are logging into create a file .ssh/
environment. Make it only readable by that user and add your path.
# echo 'PATH="/bin:/usr/bin:/someotherpath"' > .ssh/environment
# chmod 600 .ssh/environment
task :dump_env do
run "echo $PATH"
end
And see if the correct path is being set.
- Jamis
Thanks for encouraging me to check again! I like this method better.
:)
On Aug 9, 1:34 pm, "Jamis Buck" <ja...@37signals.com> wrote:
> Your default_environment setting looks right. How are you sure that it
> isn't working? Try creating a simple task like this:
>
> task :dump_env do
> run "echo $PATH"
> end
>
> And see if the correctpathis being set.
>
> - Jamis