title: Error installing gems: cannot load such file -- zlib
body: <p>I'm trying to install bundler gem on Mac OS Yosmite</p>
  
  <pre><code>~/code/hello gem install bundler
  ERROR:  Loading command: install (LoadError)
      cannot load such file -- zlib
  ERROR:  While executing gem ... (NoMethodError)
      undefined method `invoke_with_build_args' for nil:NilClass
  </code></pre>
  
  <p>I've done the following:</p>
  
  <ul>
  <li>Install zlib through homebrew</li>
  <li>Upgrade Rubygems</li>
  <li>Reinstall RVM and Ruby 2.2.2</li>
  <li>Switched to Rbenv and Ruby 2.2.2</li>
  </ul>
  
  <p>This is really doing my head in. Ruby 2.2.1 works fine but 2.2.2 causes this issue whenever I try to install a gem.</p>
  
  <p>Anyone got any ideas?</p>