1
當運行命令$ gem help install
,或除gem
和gem help
其工作的任何其他gem
條命令,我得到如下:寶石命令失敗「錯誤:加載命令:安裝(LoadError)不能加載這樣的文件 - 日期」
ERROR: Loading command: install (LoadError)
cannot load such file -- date
ERROR: While executing gem ... (NoMethodError)
undefined method `invoke' for nil:NilClass
我已經在RVM和我的主目錄中定義了ruby版本的目錄,但它並非如此。
我試圖刪除RVM和安裝rbenv,但得到與rbenv錯誤,現在我無法讓RVM因此而再次工作。使用系統紅寶石(ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]
)時
$ gem environment
RubyGems Environment:
- RUBYGEMS VERSION: 2.5.1
- RUBY VERSION: 2.3.0 (2015-12-25 patchlevel 0) [x86_64-darwin15]
- INSTALLATION DIRECTORY: /Users/aymericbouzy/.rvm/gems/ruby-2.3.0
- USER INSTALLATION DIRECTORY: /Users/aymericbouzy/.gem/ruby/2.3.0
- RUBY EXECUTABLE: /Users/aymericbouzy/.rvm/rubies/ruby-2.3.0/bin/ruby
- EXECUTABLE DIRECTORY: /Users/aymericbouzy/.rvm/gems/ruby-2.3.0/bin
- SPEC CACHE DIRECTORY: /Users/aymericbouzy/.gem/specs
- SYSTEM CONFIGURATION DIRECTORY: /etc
- RUBYGEMS PLATFORMS:
- ruby
- x86_64-darwin-15
- GEM PATHS:
- /Users/aymericbouzy/.rvm/gems/ruby-2.3.0
- /Users/aymericbouzy/.rvm/gems/[email protected]
- GEM CONFIGURATION:
- :update_sources => true
- :verbose => true
- :backtrace => false
- :bulk_threshold => 1000
- REMOTE SOURCES:
- https://rubygems.org/
- SHELL PATH:
- /Users/aymericbouzy/.rvm/gems/ruby-2.3.0/bin
- /Users/aymericbouzy/.rvm/gems/[email protected]/bin
- /Users/aymericbouzy/.rvm/rubies/ruby-2.3.0/bin
- /Users/aymericbouzy/.nvm/versions/node/v6.2.1/bin
- /usr/local/sbin
- /Users/aymericbouzy/.rbenv/shims
- /Users/aymericbouzy/.rbenv/bin
- /usr/local/bin
- /usr/bin
- /bin
- /usr/sbin
- /sbin
- /opt/X11/bin
- /opt/local/bin
- /opt/local/sbin
- /opt/local/bin
- /opt/local/sbin
- /usr/local/bin
- /usr/bin
- /bin
- /usr/sbin
- /sbin
- /usr/texbin
- /sbin
- /Applications/Postgres.app/Contents/Versions/latest/bin
- /Applications/Postgres.app/Contents/Versions/latest/bin
- /Users/aymericbouzy/.rvm/bin
命令gem install bundler
成功,但是使用在我的項目的Gemfile中指定的紅寶石2.3.1版時失敗。
謝謝你的幫助。
我剛剛升級紅寶石機智'RVM GET stable'現在使用的版本「紅寶石2.3.1p112(2016-04 -26修訂版54768)[x86_64-darwin15]「 並且這給了我相同的錯誤(無法加載文件 - 日期)。 – Cyberroadie