I followed the [Phusion Passenger guide][1] to install rvm on EC2. It states to do the following:
$ gpg --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3
$ curl -sSL https://get.rvm.io | sudo bash -s stable
$ sudo usermod -a -G rvm `whoami`
$ if sudo grep -q secure_path /etc/sudoers; then sudo sh -c "echo export rvmsudo_secure_path=1 >> /etc/profile.d/rvm_secure_path.sh" && echo Environment variable installed; fi
I log out and log back in and get the following:
$ rvm
No command 'rvm' found, but there are 20 similar ones
rvm: command not found
I installed rvm as root, which what I wanted. I added my user to the rvm group and so I should have system wide access. The rvm files are still there:
$ sudo find / -name "rvm"
/usr/local/rvm
/usr/local/rvm/src/rvm
/usr/local/rvm/src/rvm/lib/rvm
/usr/local/rvm/src/rvm/bin/rvm
/usr/local/rvm/src/rvm/scripts/rvm
/usr/local/rvm/lib/rvm
/usr/local/rvm/bin/rvm
/usr/local/rvm/rubies/ruby-1.9.3-p0/lib/ruby/gems/1.9.1/gems/rvm-1.11.3.9/lib/rvm
/usr/local/rvm/scripts/rvm
Why can't my system find rvm?
I solved the problem by the next several steps:
sudo apt-get install curl
curl -L https://get.rvm.io | bash -s stable
source ~/.rvm/scripts/rvm
rvm requirements
Simple Steps:
1) echo "source /etc/profile.d/rvm.sh" >> ~/.bash_profile
2) . ~/.bash_profile
All good.
There is a little trick to this. This is how I solved a similar problem.
Run your terminal command as a login shell. This is how to set that up.
This should fix it. I will be happy to get your feedback if it works for you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With