Why am I getting "rvm: command not found" on Ubuntu?
I am trying to set up Siri Proxy, and I come up to the steps:
rvmsudo rvm install 1.9.3
rvm use 1.9.3 --default
rvmsudo gem install eventmachine CFPropertyList httparty json uuidtoolsBut I can't do them due to these errors:
rvm: command not found
rvmsudo: command not foundI know this is due to Ruby Version Manager not being installed or properly set up. I am using Ubuntu 11.04 and I only have SSH access.
This is what I've done beforehand to install and initialize Ruby:
sudo apt-get install nano ruby build-essential openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion
bash < <(curl -s )
[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm"
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bash_profile 1 2 Answers
The problem is that the commands rvm and rvmsudo are not in your PATH. The PATH is a variable that lists all of the directories that are searched for commands.
You need to find out where the rvm and rvmsudo commands are actually located; it could be in /usr/local somewhere or in /opt. If the RVM software was installed in /usr/local I would guess that it would work just fine; check /opt.
Then add the directories that contain commands to your PATH (on the command line and in .profile):
export PATH=$PATH:/opt/rvm/bin:/opt/rvm/sbin(The directories are just examples.) Using $PATH preserves your current PATH and adds the two new directories on the end. Directories are searched from left to right and are separated by :.
More on this can be found in man bash or man sh or man ksh depending on your shell.
On Ubuntu you need to use ~/.bashrc instead of ~/.bash_profile in case if per user installations, So do:
echo '[[ -s "$HOME/.rvm/scripts/rvm" ]] && . "$HOME/.rvm/scripts/rvm" # Load RVM function' >> ~/.bashrcor if you're using ubuntu 12.04:
echo '[[ -s "/usr/local/rvm/scripts/rvm" ]] && . "/usr/local/rvm/scripts/rvm" # Load RVM function' >> ~/.bashrcand after that:
source ~/.bashrcand test with:
type rvm | head -1you should get: rvm is a function
0