I\'ve got a staging server with both standard Ruby and Ruby Enterprise installed. As standard Ruby refuses to install a critical gem, I need to set $PATH so that ruby/gem/r
If you need to set a variable on the remote host other than PATH, you should know that sshd only allows certain /etc/profile or ~/.bashrc environment variables by default, for security reasons. As Lou said, you can either do cap shell and use the cap> printenv command, or you can do cap COMMAND=printenv invoke in one command.
If you see the variable when you ssh into the remote shell normally, but you don't see it in the cap printenv command, here's one solution:
PermitUserEnvironment yes in your remote server's /etc/ssh/sshd_config file, and restart sshd~/.ssh/environment file for the remote user you are ssh'ing in as, and put your variable(s) there as VARIABLE=valueNow those should show up when you do cap COMMAND=printenv invoke