I solved the problem by the next several steps:
sudo apt-get install curlcurl -L https://get.rvm.io | bash -s stablesource ~/.rvm/scripts/rvmrvm requirements
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' >> ~/.bashrc
or if you're using ubuntu 12.04:
echo '[[ -s "/usr/local/rvm/scripts/rvm" ]] && . "/usr/local/rvm/scripts/rvm" # Load RVM function' >> ~/.bashrc
and after that:
source ~/.bashrc
and test with:
type rvm | head -1
you should get: rvm is a function
This is how I solved it:
Go to root directory and run this two commands:
gpg2 --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB
\curl -sSL https://get.rvm.io | bash -s stable
Follow this link: http://rvm.io/ then install any version of rvm you want.
I assume you followed the instructions to install as found here ubuntu_rvm
And when you say added it into .bashrc you mean you ran echo 'source "/etc/profile.d/rvm.sh"' >> ~/.bashrc. Your path should contain something like /home/suvodip/.rvm but i dont see it, are you sure you followed all the install instructions?
Then opening a new terminal should do the trick.
Maybe try running which -a rvm or whereis rvm to see if anything is found. Or failing that sudo find / -name rvm 2>/dev/null to see if the install worked and where the files went. Please update your question with all the details here. thanks
Possible duplicate of: Ubuntu rvm setup issue
Your problem is that RVM is not loaded when you open a new terminal.
To solve this, run this command line: (if using login-shell)
echo "source $HOME/.rvm/scripts/rvm" >> ~/.bash_profile
Or this (if using non-login shell):
echo "source $HOME/.rvm/scripts/rvm" >> ~/.bashrc
Or if you are using zsh (and/or oh-my-zsh):
echo "source $HOME/.rvm/scripts/rvm" >> ~/.zshrc
This will add the path to RVM to load at each Terminal instantiation. You must either close and reopen your terminals or simply call source ~/.bashrc (or ~/.bash_profile or ~/.zshrc).
I had this problem after installing zsh. I'm a domain user so my $PATH and $HOME are not as straight-forward. What worked for me was
echo "source /usr/share/rvm/scripts/rvm" >> ~/.zshrc
Steps to try out:
Log out and login to your system.
Open a new terminal and manually run
source $HOME/.rvm/scripts/rvm
then
rvm
Check these work-arounds.
Update:
To avoid running
source $HOME/.rvm/scripts/rvm
every time you open a terminal, include this line into ~/.MacOSX/environment in your Mac (This is similar to ~/.bashrc in GNU/Linux-based systems under $home aka ~ directory).
In my case, i am using Ubuntu Bash in Windows 10 and to fix the problem i used:
source /usr/local/rvm/scripts/rvm
It might because the terminal not having rvm shell configuration loaded.
Try following from your terminal:
$ source ~/.rvm/scripts/rvm
then
$ type rvm | head -n 1
If the output is:
rvm is a function
You may need to add "source ~/.rvm/scripts/rvm" to your ~/.bash_profile file
you need to read all the texts that are displayed when you install RVM:
rm -rf ~/.rvm
curl -L https://get.rvm.io | bash -s stable