Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is $GEM_PATH usually set?

Tags:

bash

rvm

gem

Where is $GEM_PATH set?

It clearly is being set as this shows:

echo $GEM_PATH
/Users/snowcrash/.rvm/gems/ruby-1.9.2-p318:/Users/snowcrash/.rvm/gems/ruby-1.9.2-p318@global

but it's not where I'd expect, e.g.

[app (master)]$ grep GEM_PATH ~/.bash_profile
[app (master)]$ grep GEM_PATH ~/.bashrc
[app (master)]$ 

EDIT

Neither is it here:

vim config/environment.rb 

# Load the rails application
require File.expand_path('../application', __FILE__)

# Initialize the rails application
Accounts::Application.initialize!
like image 372
Snowcrash Avatar asked Dec 20 '12 14:12

Snowcrash


People also ask

What is Gem_path?

GEM_PATH provides the locations (there may be several) where gems can be found. GEM_HOME is where gems will be installed (by default).

How do I remove a gem path?

Just right click on a gem to pull it back out. You can remove them, put them in any other slot of that color. There are serveral video guides on youtube about nearly anything that new players may be asking questions about. This is a short video in my Path of Exile series that explains the skill and gem system.


2 Answers

the default ruby is loaded when you source /path/to/rvm/scripts/rvm, and setting default ruby amount other sets GEM_HOME, GEM_PATH and PATH

like image 68
mpapis Avatar answered Sep 30 '22 02:09

mpapis


(Edited) A few other places to check for GEM_PATH:

  • config/environment.rb
  • /etc/profile
  • /etc/profile.d
  • /etc/bashrc

See also: http://www.linuxfromscratch.org/blfs/view/6.3/postlfs/profile.html

like image 21
sampson-chen Avatar answered Sep 30 '22 00:09

sampson-chen