title: Cannot update brew in MAC OS X el capitan and keep getting a Load error with `require`
body: <p>I am not sure why this is happening but I cannot update brew in my MAC OS X El Capitan. I did:</p>
  
  <p><code>brew update</code></p>
  
  <p>and got:</p>
  
  <pre><code>warning: unable to unlink CONTRIBUTING.md: Permission denied
  warning: unable to unlink SUPPORTERS.md: Permission denied
  fatal: cannot create directory at '.github': Permission denied
  </code></pre>
  
  <p>to go over that issue I sudoed the above command but got further issues:</p>
  
  <pre><code>sudo brew update
  Password:
  /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- mach (LoadError)
      from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
      from /usr/local/Library/Homebrew/extend/pathname.rb:2:in `&lt;top (required)&gt;'
      from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
      from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
      from /usr/local/Library/Homebrew/global.rb:3:in `&lt;top (required)&gt;'
      from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
      from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
      from /usr/local/Library/brew.rb:16:in `&lt;main&gt;'
  </code></pre>
  
  <p>now whenever I do brew install I get:</p>
  
  <pre><code>brew update
  
  /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require': cannot load such file -- mach (LoadError)
      from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
      from /usr/local/Library/Homebrew/extend/pathname.rb:2:in `&lt;top (required)&gt;'
      from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
      from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
      from /usr/local/Library/Homebrew/global.rb:3:in `&lt;top (required)&gt;'
      from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
      from /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/rubygems/core_ext/kernel_require.rb:55:in `require'
      from /usr/local/Library/brew.rb:16:in `&lt;main&gt;'
  </code></pre>
  
  <p>in fact, it seems that whenever I do anything, like just type <code>brew</code> it gets the same message. Does anyone know how to fix this?</p>