更改Gem Env的用户安装目录和Gem路径?

时间:2019-07-06 23:27:42

标签: rubygems

我的宝石环境如下:

Quocs-MacBook-Air:~ quochoantrinh$ gem env
RubyGems Environment:
  - RUBYGEMS VERSION: 3.0.3
  - RUBY VERSION: 2.6.3 (2019-04-16 patchlevel 62) [x86_64-darwin16]
  - INSTALLATION DIRECTORY: /Users/quochoantrinh/.rvm/gems/ruby-2.6.3
  - USER INSTALLATION DIRECTORY: /Users/quochoantrinh/.gem/ruby/2.6.0
  - RUBY EXECUTABLE: /usr/local/opt/ruby/bin/ruby
  - GIT EXECUTABLE: /usr/bin/git
  - EXECUTABLE DIRECTORY: /Users/quochoantrinh/.rvm/gems/ruby-2.6.3/bin
  - SPEC CACHE DIRECTORY: /Users/quochoantrinh/.gem/specs
  - SYSTEM CONFIGURATION DIRECTORY: /usr/local/Cellar/ruby/2.6.3/etc
  - RUBYGEMS PLATFORMS:
    - ruby
    - x86_64-darwin-16
  - GEM PATHS:
     - /Users/quochoantrinh/.rvm/gems/ruby-2.6.3
     - /Users/quochoantrinh/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0
  - GEM CONFIGURATION:
     - :update_sources => true
     - :verbose => true
     - :backtrace => false
     - :bulk_threshold => 1000
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /usr/local/opt/ruby/bin
     - /Users/quochoantrinh/.rvm/gems/ruby-2.6.3/bin
     - /Users/quochoantrinh/.rvm/gems/ruby-2.6.3@global/bin
     - /Users/quochoantrinh/.rvm/rubies/ruby-2.6.3/bin
     - /Users/quochoantrinh/.yarn/bin
     - /Users/quochoantrinh/.config/yarn/global/node_modules/.bin
     - /Users/quochoantrinh/anaconda3/bin
     - /Users/quochoantrinh/anaconda3/bin
     - /Users/quochoantrinh/anaconda/bin
     - /usr/local/bin
     - /usr/bin
     - /bin
     - /usr/sbin
     - /sbin
     - /Library/Frameworks/Mono.framework/Versions/Current/Commands
     - /Users/quochoantrinh/.rvm/bin

但是存在一些不一致之处。对于用户安装目录,当应为2.6.3版本时,它是/Users/quochoantrinh/.gem/ruby/2.6.0。对于“宝石路径”来说,就像/Users/quochoantrinh/.rvm/rubies/ruby-2.6.3/lib/ruby/gems/2.6.0一样,它应该是2.6.3版本。

如何将其更改为正确的版本? 非常感谢!

0 个答案:

没有答案