You're right, it is working. Not sure what I was doing wrong before as I pulled that part out of my capfile. At least now I know what that SSH setting is for, always wondered about that.
Thanks for encouraging me to check again! I like this method better. :) On Aug 9, 1:34 pm, "Jamis Buck" <[EMAIL PROTECTED]> 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 > > On 8/9/07, dusty <[EMAIL PROTECTED]> wrote: > > > > > On Aug 2, 6:53 pm, "Jamis Buck" <[EMAIL PROTECTED]> wrote: > > > Right, no profiles are loaded by Capistrano, by default, because it > > > does not execute commands in a login shell. If you want non-login > > > shells to use the profiles, you can set an sshd configuration > > > option...but you'll need to google for it, because I can't remember it > > > off the top of my head. > > > > And yes, deploy.rb is where you set default_environment. > > > > - Jamis > > > > On 8/2/07, redbaritone <[EMAIL PROTECTED]> wrote: > > > > > > 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 yourpath. > > > # echo 'PATH="/bin:/usr/bin:/someotherpath"' > .ssh/environment > > # chmod 600 .ssh/environment --~--~---------~--~----~------------~-------~--~----~ To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/capistrano -~----------~----~----~----~------~----~------~--~---
