I just got a new MacBook Pro and tried to setup the RVM in the system. I installed RVM and set the default to
➜ rvm list default
Default Ruby (for new shells)
ruby-1.9.3-p194 [ x86_64 ]
My RVM version is
➜ rvm --version
rvm 1.16.8 (master) by Wayne E. Seguin , Michal Papis [https://rvm.io/]
I have put [[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # This loads RVM into a shell session.
at the bottom of the .bashrc_profile.
When I open the new Terminal window, I have done rvm default
every time to reset from system ruby to rvm installed ruby.
I have done 3 hours research and read more than 20 different blogs about this issue. And I still do not have a solution for this problem.
Removing Rubies. There are two ways to remove rubies from rvm: rvm remove # Removes the ruby, source files and optional gemsets / archives. rvm uninstall # Just removes the ruby - leaves everything else.
RVM is a command-line tool for managing multiple ruby versions and also uses a separate gemset for each rails app. RVM is a command-line tool that allows you to easily install, manage, and work with multiple ruby environments from interpreters to sets of gems.
To set a default Ruby version with rvm, enter rvm --default use 3.0. 0 on the command line. To switch to the system ruby, enter rvm use system . To switch back to the default, rvm default .
If RVM is working in the shell but just isn't using the preferred ruby as default, set it with the following for 1.9.3:
rvm --default use 1.9.3
If RVM isn't working, it's likely a login shell problem that RVM isn't loading:
Login shells (typically when a terminal window is opened in an X window manager) will use .bash_profile
but interactive, non-login shells reference .bashrc
(likely where the rvm shell code are loaded).
Cheap fix, symlink them:
ln -s ~/.bashrc ~/.bash_profile
Optionally, some terminals (e.g. gnome-terminal) offer settings to force login shells for each new terminal session too.
Create a .bash_login
file with the following contents:
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
(Bash will check for ~/.bash_profile
, then ~/.bash_login
, and finally ~/.profile
.)
See the bash man page for additional detailed information.
I'm not familiar with a .bashrc_profile
file. I think you mean to have this line in your .profile
or .bashrc
file.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With