Topic: Configuring sudo PATH in Capistrano Deployments
Topic type:
How to add paths to Capistrano's sudo command (useful for ruby enterprise edition installs)
Enable User Environments
Edit /etc/ssh/sshd_config and add the following to the bottom of the file:
PermitUserEnvironment yes
Then reboot sshd by running:
/etc/init.d/ssh reload
Configuring the PATH
Create (if it doesn't already exist) and open .ssh/environment, and put something like this inside (edit the ree path if you have one).
PATH=/opt/ree-latest/bin:/var/lib/gems/1.8/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11
Now any capistrano sudo commands will use ree instead of the default ruby on the system.
was the last to edit Configuring sudo PATH in Capistrano Deployments
on May 27th, 2009 at 12:07 PM