gem environment
输入命令之后,终端会给出下面一堆信息,我们系统梳理一下
RubyGems Environment:
- RUBYGEMS VERSION: 3.0.3
- RUBY VERSION: 2.6.3 (2019-04-16 patchlevel 62) [universal.x86_64-darwin20]
- INSTALLATION DIRECTORY: /Library/Ruby/Gems/2.6.0
- USER INSTALLATION DIRECTORY: /Users/meimei/.gem/ruby/2.6.0
- RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/bin/ruby
- GIT EXECUTABLE: /usr/bin/git
- EXECUTABLE DIRECTORY: /usr/local/bin
- SPEC CACHE DIRECTORY: /Users/meimei/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /Library/Ruby/Site
- RUBYGEMS PLATFORMS:
- ruby
- universal-darwin-20
- GEM PATHS:
- /Library/Ruby/Gems/2.6.0
- /Users/meimei/.gem/ruby/2.6.0
- /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- :sources => ["https://gems.ruby-china.com"]
- REMOTE SOURCES:
- https://gems.ruby-china.com
- SHELL PATH:
- /Library/Frameworks/Python.framework/Versions/3.6/bin
- /usr/local/bin
- /usr/bin
- /bin
- /usr/sbin
- /sbin
- /Library/Apple/usr/bin
系统安装的rubygems版本是3.0.3
RubyGems:是ruby的包管理器,方便ruby 软件包的安装、下载和使用
gem:就是软件包,本质是“a packaged Ruby application or library.”
ruby版本是2.6.3,ruby的介绍和安装可以参考官网:https://www.ruby-lang.org/en/documentation/installation/
所有用户皆可用的系统程序放在/bin
超级用户才能使用的系统程序放在/sbin
所有用户都可用的应用程序放在/usr/bin
超级用户才能使用的应用程序放在/usr/sbin
所有用户都可用的与本地机器无关的程序存放在/usr/local/bin
超级用户才能使用的与本地机器无关的程序存放在/usr/local/sbin