Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to change rvm install location?

Tags:

Currently I have rvm installed under /home/john/.rvm

How do move rvm to the location /opt/local/rvm ?

I tried to use the rvmrc file to take care of this (according to the rvm document here: https://rvm.io/workflow/rvmrc/ ) but no luck, I found a rvmrc file under /etc/

Is there any step by step instruction I could follow?

like image 840
John Powel Avatar asked Mar 07 '13 21:03

John Powel


People also ask

Where is RVM located?

Single-User Install Location: ~/. rvm/ If the install script is run as a standard, non-root user, RVM will install into the current users's home directory.


2 Answers

Figure out myself by doing some research online, hope this can help someone out:

Suppose you want to move from home/username/.rvm to /opt/local/rvm

  1. Update you .bash_profile or .bashrc to:

    if [ -s "$HOME/.rvmrc" ]; then     source "$HOME/.rvmrc" fi # to have $rvm_path defined if set if [ -s "${rvm_path-$HOME/.rvm}/scripts/rvm" ]; then     source "${rvm_path-$HOME/.rvm}/scripts/rvm" fi 
  2. find your .rvmrc under $HOME/.rvmrc, if not found, create one and put this line in it:

    export rvm_path=/opt/local/rvm

  3. move your file to the new location : mv $HOME/.rvm/* /opt/local/rvm
  4. execute rvm repair all and rvm reload

And you are good to go!

like image 53
John Powel Avatar answered Sep 22 '22 12:09

John Powel


You can do

curl -sSL https://get.rvm.io | bash -s -- --path /path/you/want/rvm/installed/to 
like image 21
jupp0r Avatar answered Sep 18 '22 12:09

jupp0r