I am getting rvm: command not found after installation of rvm
Solution 1
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).
Solution 2
In my case, i am using Ubuntu Bash in Windows 10 and to fix the problem i used:
source /usr/local/rvm/scripts/rvm
Solution 3
For those that are doing this in 2018 just add
source $HOME/.rvm/scripts/rvm
to your .bash_profile within your home directory.
Solution 4
For Ubuntu 18.04, I had to run the command below to solve the issue after rvm was installed using instruction from here.
source /usr/share/rvm/scripts/rvm
Solution 5
you need to enable login shell in terminal emulator preferences, sometimes it is needed to use /usr/bin/bash --login
, here is an example https://rvm.io/integration/gnome-terminal/
after enabling login shell you need to close terminal application and open it fresh.
Ramya
Updated on July 09, 2022Comments
-
Ramya almost 2 years
I know the above question is very common question. I have gone through multiple posts on this topic. But I didn't get any resolution.
I have installed rvm locally. We already have the installation files. SO went into the folder and run the install command.
$ ./install
Then I checked ./rvm folder in the Users home folde
$ cd ~/.rvm
folder exists. Hence Installation is successful.
Now I am typing rvm in the command line
$ rvm
I am getting below exception
$ rvm -sh: rvm: command not found
After reading the multiple articles in stackoverflow on this issue, I learned that I have to add the below lines in .bash_profile as I am using Mac OSX 10.7.3
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm"
Even after I am getting same exception while typing rvm. Is there any thing extra I need to do? or Am I missing some thing? Please help
-
Ramya over 11 yearsI have tried with the above specified steps. How ever I am getting "-bash: $HOME/.rvm/scripts/rvm: No such file or directory" while running the command "$ source '$HOME/.rvm/scripts/rvm'". And after that if I run rvm in terminal still I am getting the specified exception. Please help
-
RAM over 11 years@Ramesh please post your rvm installation directory path.
-
RAM over 11 years@Ramesh irrespective of the installation path, if your rvm was installed correctly, then run
source path_to_rvm_directory/scripts/rvm
. It should run the scriptrvm
and then type the commandrvm
. -
Ramya over 11 yearsIt is working. Thank you. Earlier I have run with quotes source '$HOME/.rvm/scripts/rvm'. Now I have run with out quotes. Thanks
-
Ramya over 11 yearsThanks for your on time support. Really appreciated
-
thisismydesign about 7 yearsThis is the solution for an entirely different issue where the rvm command is found but the user will receive the error
RVM is not a function
. It is also not sometimes but either-or. The user should either change the terminal preferences and reopen the terminal or issuebash --login
in which case terminal reopen is not needed but it is a 1-time solution only. -
lkahtz about 6 yearsSolved my problem.
-
Ndeto about 5 yearsThis solved my problem when setting up RVM in Docker
-
Josiah Yoder over 3 yearsFor me, it was
source /usr/share/rvm/scripts/rvm
that worked.