Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I am getting rvm: command not found after installation of rvm

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

like image 594
Ramya Avatar asked Nov 06 '12 07:11

Ramya


2 Answers

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
like image 100
RubyFanatic Avatar answered Oct 20 '22 00:10

RubyFanatic


Steps to try out:

  1. Log out and login to your system.

  2. 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).

like image 39
RAM Avatar answered Oct 19 '22 22:10

RAM