Where do gems install?
Look at your gem environment.
In a terminal run gem env
You should see an entry INSTALLATION DIRECTORY
, but there is also GEM PATHS
which is where it's loading all your gems from in your current environment.
Rvm
$ rvm gemdir
Or you can check:
echo $GEM_HOME
Bundler
$ bundle show --paths
For specific gem:
$ bundle show 'gem_name'
Gem
$ gem env
For specific gem:
$ gem which 'gem_name'
To see the default installation directory, run
gem env gemdir
If you want to change the default installation directory (for example, to ~/.gem/ruby/2.1.0), add this line to ~/.bashrc
export GEM_HOME=~/.gem/ruby/2.1.0
And you also need to make sure ~/.gem/ruby/2.1.0/bin is in your PATH environment variable to use the commands provided by gem packages. If not, add this line to ~/.bashrc
export PATH=$PATH:~/.gem/ruby/2.1.0/bin