title: Can't install Ruby Gems - gives a zlib error
body: <hr>
  
  <p>Whenever I try and install any ruby gem (trying to install rails), I get this error:</p>
  
  <pre><code>ERROR:  Loading command: update (LoadError)
      cannot load such file -- zlib
  ERROR:  While executing gem ... (NoMethodError)
      undefined method `invoke_with_build_args' for nil:NilClass
  </code></pre>
  
  <p>I have tried everything I can think of; reinstalling ruby, trying different ruby versions, etc., but I keep getting this error.</p>
  
  <p>I am currently using Ruby Version 2.3.1, and I am on mac os x 10.11 El Capitan. I am trying to install the rails gem on my system so that I can use it in all my projects.</p>