如何在.gemrc中设置RUBY EXECUTABLE

时间:2014-07-01 10:28:38

标签: ruby ubuntu gem rubygems environment-variables

我的~.gemrc看起来像是:

gem: --user-install --no-ri --no-rdoc
gemhome: /home/me/.gems
gempath:
  - /home/me/.gems

gem env返回:

RubyGems Environment:
  - RUBYGEMS VERSION: 1.8.23.2
  - RUBY VERSION: 1.9.3 (2014-05-14 patchlevel 547) [x86_64-linux]
  - INSTALLATION DIRECTORY: /home/me/.gems
  - RUBY EXECUTABLE: /usr/local/bin/ruby
  - EXECUTABLE DIRECTORY: /home/me/.gems/bin
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-linux
  - GEM PATHS:
     - /home/me/.gems
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :benchmark => false
     - :backtrace => false
     - :bulk_threshold => 1000
     - "gem" => "--user-install --no-ri --no-rdoc"
     - "gemhome" => "/home/me/.gems"
     - "gempath" => ["/home/me/.gems"]
  - REMOTE SOURCES:
     - http://rubygems.org/

我的$PATH

/home/me/ruby:/home/me/ruby/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games

which ruby返回/home/slackbot/ruby/ruby

此外,当我安装任何像gem install bundler这样的宝石时,它会转到

.gem/ruby/1.9.1/bin/bundle

无论我的1.9.3版本。

设置它我做错了什么?

0 个答案:

没有答案