gem command fails with "ERROR: Loading command: install (LoadError) cannot load such file -- date"
<p>When running command <code>$ gem help install</code>, or any other <code>gem</code> commmand except <code>gem</code> and <code>gem help</code> which work, I get the following:</p>

<pre><code>ERROR:  Loading command: install (LoadError)
    cannot load such file -- date
ERROR:  While executing gem ... (NoMethodError)
    undefined method `invoke' for nil:NilClass
</code></pre>

<p>I have tried both in directories where ruby version is defined by RVM and my home directory where it is not the case.</p>

<p>I tried removing RVM and installing rbenv, but was getting errors with rbenv and now I can't get RVM to work again because of this.</p>

<pre><code>$ 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/ruby-2.3.0@global
  - GEM CONFIGURATION:
     - :update_sources =&gt; true
     - :verbose =&gt; true
     - :backtrace =&gt; false
     - :bulk_threshold =&gt; 1000
  - REMOTE SOURCES:
     - https://rubygems.org/
  - SHELL PATH:
     - /Users/aymericbouzy/.rvm/gems/ruby-2.3.0/bin
     - /Users/aymericbouzy/.rvm/gems/ruby-2.3.0@global/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
</code></pre>

<p>Command <code>gem install bundler</code> succeeds when using system ruby (<code>ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]</code>), but fails when using ruby version 2.3.1 as specified in the Gemfile of my project.</p>

<p>Thank you for your help.</p>