title: Broken Gem Path on Terminal Start Mac OS X
body: <p>When opening a new terminal I get: </p>
  
  <pre><code>Traceback (most recent call last):
          3: from /usr/local/bin/bundle:22:in `&lt;main&gt;'
          2: from /usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/rubygems/core_ext/kernel_gem.rb:65:in `gem'
          1: from /usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/rubygems/dependency.rb:323:in `to_spec'
  /usr/local/Cellar/ruby/2.6.5/lib/ruby/2.6.0/rubygems/dependency.rb:311:in `to_specs': Could not find 'bundler' (&gt;= 0) among 7 total gem(s) (Gem::MissingSpecError)
  Checked in 'GEM_PATH=/Users/tkellogg/.gem/ruby/2.6.0:/usr/local/lib/ruby/gems/2.6.0:/usr/local/Cellar/ruby/2.6.5/lib/ruby/gems/2.6.0', execute `gem env` for more information
  </code></pre>
  
  <p>Bash Profile looks like:</p>
  
  <pre class="lang-sh prettyprint-override"><code>. ~/.bashrc
  
  # Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
  export PATH="$PATH:$HOME/.rvm/bin"
  
  [[ -s "$HOME/.rvm/scripts/rvm" ]] &amp;&amp; source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
  </code></pre>
  
  <p>bashrc looks like;</p>
  
  <pre><code># Add RVM to PATH for scripting. Make sure this is the last PATH variable change.
  export PATH="$PATH:$HOME/.rvm/bin"
  </code></pre>
  
  <p>I've set the default system ruby to be 2.6.5 and I've upgraded homebrew. </p>
  
  <p>Any ideas?</p>
  
  <p>Running <code>bundle update --bundler</code> gives <code>env: ruby: Argument list too long</code></p>
  
  <p>This is the result of <code>gem env</code>:</p>
  
  <pre><code>Ignoring gem-wrappers-1.4.0 because its extensions are not built. Try: gem pristine gem-wrappers --version 1.4.0
  Error loading RubyGems plugin "/Users/me/.rvm/rubies/ruby-2.6.5/lib/ruby/gems/2.6.0/gems/gem-wrappers-1.4.0/lib/rubygems_plugin.rb": cannot load such file -- gem-wrappers (LoadError)
  RubyGems Environment:
    - RUBYGEMS VERSION: 3.1.2
    - RUBY VERSION: 2.3.7 (2018-03-28 patchlevel 456) [universal.x86_64-darwin18]
    - INSTALLATION DIRECTORY: /Users/me/.gem
    - USER INSTALLATION DIRECTORY: /Users/me/.gem/ruby/2.3.0
    - RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
    - GIT EXECUTABLE: /usr/local/bin/git
    - EXECUTABLE DIRECTORY: /Users/me/.gem/bin
    - SPEC CACHE DIRECTORY: /Users/me/.gem/specs
    - SYSTEM CONFIGURATION DIRECTORY: /Library/Ruby/Site
    - RUBYGEMS PLATFORMS:
      - ruby
      - universal-darwin-18
    - GEM PATHS:
       - /Users/me/.gem
       - /Users/me/.rvm/gems/ruby-2.6.5
       - /Users/me/.rvm/rubies/ruby-2.6.5/lib/ruby/gems/2.6.0
    - GEM CONFIGURATION:
       - :update_sources =&gt; true
       - :verbose =&gt; true
       - :backtrace =&gt; false
       - :bulk_threshold =&gt; 1000
    - REMOTE SOURCES:
       - https://rubygems.org/
    - SHELL PATH:
       - /usr/local/bin
       - /usr/local/sbin
       - /Users/me/anaconda3/bin
       - /Users/me/.node/bin
       - /Users/me/.yarn/bin
       - /Users/me/.nvm/versions/node/v10.14.1/bin
       - /Users/me/bin
       - /usr/bin
       - /usr/local/heroku/bin
       - /Users/me/.gvm/pkgsets/go1.8.3/global/bin
       - /Users/me/.gvm/gos/go1.8.3/bin
       - /Users/me/.gvm/pkgsets/go1.8.3/global/overlay/bin
       - /Users/me/.gvm/bin
       - /Users/me/.gvm/bin
       - /Users/me/go
       - /Users/me/go/bin
       - /Library/Frameworks/Python.framework/Versions/3.6/bin
       - ~/npm-global/bin
       - /Users/me/.yarn/bin
       - /Users/me/bin
       - /usr/bin
       - /usr/local/heroku/bin
       - /Users/me/.gvm/pkgsets/go1.8.3/global/bin
       - /Users/me/.gvm/gos/go1.8.3/bin
       - /Users/me/.gvm/pkgsets/go1.8.3/global/overlay/bin
       - /Users/me/.gvm/bin
       - /Users/me/.gvm/bin
       - /Users/me/go
       - /Users/me/go/bin
       - /Users/me/.yarn/bin
       - /Users/me/bin
       - /usr/bin
       - /usr/local/heroku/bin
       - /Users/me/.rvm/gems/ruby-2.6.5/bin
       - /Users/me/.rvm/gems/ruby-2.6.5@global/bin
       - /Users/me/.rvm/rubies/ruby-2.6.5/bin
       - /Users/me/.rvm/bin
       - /Users/me/.yarn/bin
       - /Users/me/bin
       - /usr/bin
       - /usr/local/heroku/bin
       - /Users/me/.gvm/pkgsets/go1.8.3/global/bin
       - /Users/me/.gvm/gos/go1.8.3/bin
       - /Users/me/.gvm/pkgsets/go1.8.3/global/overlay/bin
       - /Users/me/.gvm/bin
       - /Users/me/.gvm/bin
       - /Users/me/.gvm/pkgsets/go1.8.3/global
       - /Users/me/.gvm/pkgsets/go1.8.3/global/bin
       - ~/bin
       - /usr/local/bin
       - /usr/bin
       - /bin
       - /usr/sbin
       - /sbin
       - /usr/local/go/bin
       - /Users/me/anaconda3/bin
       - /Users/me/.node/bin
       - /Users/me/.gvm/pkgsets/go1.8.3/global/bin
       - /Users/me/.gvm/gos/go1.8.3/bin
       - /Users/me/.gvm/pkgsets/go1.8.3/global/overlay/bin
       - /Users/me/.gvm/bin
       - /Users/me/go
       - /Users/me/go/bin
       - /Library/Frameworks/Python.framework/Versions/3.6/bin
       - ~/npm-global/bin
       - /Users/me/.yarn/bin
       - /Users/me/bin
       - /usr/local/heroku/bin
       - /usr/local/mysql/bin
       - /usr/local/mysql/bin
       - /Users/me/.rvm/bin
       - /Users/me/.rvm/bin
       - /Users/me/.rvm/bin
       - /Users/me/.rvm/bin
  </code></pre>