I have this command:
ubuntu@ip-10:~$ sudo su deploy -c 'rvm install 1.9.3'
bash: rvm: command not found
I also tried:
ubuntu@ip-10:~$ sudo su deploy -c 'source /home/deploy/.bashrc && rvm install 1.9.3'
bash: rvm: command not found
Same result. Not sure what's happening because when I do this:
sudo su deploy
deploy@ip-10-101-6-147:/home/ubuntu$ rvm install 1.9.3
Fetching yaml-0.1.4.tar.gz to /home/deploy/.rvm/archives
All works great. But I can't do that because this is for a shell script. Why doesn't it work in the first two instances?