title: Why does 'gem install bundler' throw "NoMethodError undefined method `size' for nil:NilClass"?
body: <p>I tried the <code>gem update --system</code> command, but still I'm facing the same error while installing bundler.</p>
  
  <pre><code>C:\Users\swapnil\Desktop\testing\behavioral_tests\backlot&gt;gem install bundler
  ERROR:  While executing gem ... (NoMethodError)
      undefined method `size' for nil:NilClass
  </code></pre>
  
  <p>I went through this <a href="https://github.com/bundler/bundler/issues/2372" rel="nofollow">https://github.com/bundler/bundler/issues/2372</a> issue but didn't get a proper solution. </p>
  
  <p>I have a Win-7, 32 bit machine.</p>
  
  <p>My gem environment is: </p>
  
  <pre><code>RubyGems Environment:
    - RUBYGEMS VERSION: 2.0.3
    - RUBY VERSION: 1.9.3 (2013-05-16 patchlevel 392) [java]
    - INSTALLATION DIRECTORY: c:/jruby-1.7.4/lib/ruby/gems/shared
    - RUBY EXECUTABLE: c:/jruby-1.7.4/bin/jruby.exe
    - EXECUTABLE DIRECTORY: c:/jruby-1.7.4/bin
    - RUBYGEMS PLATFORMS:
      - ruby
      - universal-java-1.7
    - GEM PATHS:
       - c:/jruby-1.7.4/lib/ruby/gems/shared
       - C:/Users/swapnil/.gem/jruby/1.9
    - GEM CONFIGURATION:
       - :update_sources =&gt; true
       - :verbose =&gt; true
       - :backtrace =&gt; false
       - :bulk_threshold =&gt; 1000
       - "install" =&gt; "--no-rdoc --no-ri --env-shebang"
       - "update" =&gt; "--no-rdoc --no-ri --env-shebang"
    - REMOTE SOURCES:
       - https://rubygems.org/
  </code></pre>