Why doesn't 'USER INSTALLATION DIRECTORY' match with the Ruby version?

天涯浪子 提交于 2019-12-18 09:55:50

问题


This question was the second part of "What is "USER INSTALLATION DIRECTORY" in rubyGems env" but finally it wasn't answered.

Now I'm wondering why in my case 'USER INSTALLATION DIRECTORY does not mach with the Ruby version. And another question is what option bundle install uses by default, maybe --user-install?

rvm list:

 * ruby-2.5.0 [ x86_64 ]
=> ruby-2.5.1 [ x86_64 ]
   ruby-2.6.0-preview1 [ x86_64 ]

gem env:

RubyGems Environment:
  - RUBYGEMS VERSION: 2.7.7
  - RUBY VERSION: 2.5.1 (2018-03-29 patchlevel 57) [x86_64-linux]
  - INSTALLATION DIRECTORY: /home/ivan/.rvm/gems/ruby-2.5.1
  - USER INSTALLATION DIRECTORY: /home/ivan/.gem/ruby/2.5.0
  ...

回答1:


The installation directory for Gems is based on the library compatibility version of Ruby. Since Ruby 2.5.1 is library-compatible with Ruby 2.5.0, its library compatibility version is still 2.5.0.



来源:https://stackoverflow.com/questions/52128499/why-doesnt-user-installation-directory-match-with-the-ruby-version

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!