OS X 10.11.5. I'm new to OS X and Ruby. I used homebrew to install chruby
and ruby-install
, then used these to install Ruby and Rails. Later I installed RubyMine. I like it, but it does not support chruby. I want to uninstall chruby
and ruby-install
and use RVM. On a different iMac I installed rvm
and RubyMine and everything works fine. Now I want to clean up my iMac to install rvm
.
The main thing I don't understand is how my set
output has things like these:
GEM_PATH=/Users/mark/.gem/ruby/2.3.1:/Users/mark/.rubies/ruby-2.3.1/lib/ruby/gems/2.3.0
GEM_ROOT=/Users/mark/.rubies/ruby-2.3.1/lib/ruby/gems/2.3.0
...
RUBY_ROOT=/Users/mark/.rubies/ruby-2.3.1
RUBY_VERSION=2.3.1
...
chruby_reset ()
{
[[ -z "$RUBY_ROOT" ]] && return;
PATH=":$PATH:";
PATH="${PATH//:$RUBY_ROOT\/bin:/:}";
if (( $UID != 0 )); then
[[ -n "$GEM_HOME" ]] && PATH="${PATH//:$GEM_HOME\/bin:/:}";
[[ -n "$GEM_ROOT" ]] && PATH="${PATH//:$GEM_ROOT\/bin:/:}";
GEM_PATH=":$GEM_PATH:";
[[ -n "$GEM_HOME" ]] && GEM_PATH="${GEM_PATH//:$GEM_HOME:/:}";
[[ -n "$GEM_ROOT" ]] && GEM_PATH="${GEM_PATH//:$GEM_ROOT:/:}";
GEM_PATH="${GEM_PATH#:}";
GEM_PATH="${GEM_PATH%:}";
unset GEM_ROOT GEM_HOME;
[[ -z "$GEM_PATH" ]] && unset GEM_PATH;
fi;
PATH="${PATH#:}";
PATH="${PATH%:}";
unset RUBY_ROOT RUBY_ENGINE RUBY_VERSION RUBYOPT;
hash -r
}
...
I've looked in the places man bash
says to look, /etc/bashrc
, /etc/profile
, ~/.bash_profile
and ~/.bashrc
, but I have not figured out how GEM_PATH
gets put in my bash shell.
GEM_PATH
in your homdir and root if necessary (e.g.grep -Rni 'GEM_PATH' / 2>/dev/null
to avoid not-access err msg)?