通常设置$ GEM_PATH在哪里?

时间:2012-12-20 14:25:19

标签: bash gem rvm

$ GEM_PATH设置在哪里?

显然正如图所示:

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

但这不是我期望的地方,例如。

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

编辑

这里也没有:

vim config/environment.rb 

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

# Initialize the rails application
Accounts::Application.initialize!

2 个答案:

答案 0 :(得分:1)

(已编辑)其他一些要检查GEM_PATH的地方:

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

另请参阅:http://www.linuxfromscratch.org/blfs/view/6.3/postlfs/profile.html

答案 1 :(得分:1)

在您source /path/to/rvm/scripts/rvm时加载默认红宝石,并设置默认红宝石数量其他集GEM_HOMEGEM_PATHPATH