How to fix the issue that GEM_HOME and/or GEM_PATH not set issue for rvm in mac version 10.12

add following lines below "export PATH="$PATH:$HOME/.rvm/bin" # Add RVM to PATH for scripting" into ~/.profile

export GEM_HOME="/Users/spond/.rvm/gems/ruby-2.3.1"

export GEM_PATH="/Users/spond/.rvm/gems/ruby-2.3.1:/Users/spond/.rvm/gems/ruby-2.3.1@global"

export PATH="/Users/spond/.rvm/gems/ruby-2.3.1/bin:/Users/spond/.rvm/gems/ruby-2.3.1@global/bin:/Users/spond/.rvm/rubies/ruby-2.3.1/bin:$PATH"

then run command:

source ~/.bash_profiile

make sure that the GEM_HOME at the first location of PATH.

原文地址:https://www.cnblogs.com/rosepotato/p/5953073.html