title: Error while installing json gem 'mkmf.rb can't find header files for ruby'
body: <p>For context, it on a remote server which has a firewall. I'm setting up my environment through a proxy. I have <code>ruby 1.8.7</code>. When I try to gem install..</p>
  
  <pre><code>sudo gem install --http-proxy &lt;host address&gt;:&lt;port&gt; json
  </code></pre>
  
  <p>I get the following error:</p>
  
  <pre><code>Building native extensions.  This could take a while...
  ERROR:  Error installing json:
          ERROR: Failed to build gem native extension.
  
  /usr/bin/ruby extconf.rb
  mkmf.rb can't find header files for ruby at /usr/lib/ruby/ruby.h
  
  Gem files will remain installed in /usr/lib64/ruby/gems/1.8/gems/json-1.8.1 for inspection.
  Results logged to /usr/lib64/ruby/gems/1.8/gems/json-1.8.1/ext/json/ext/generator/gem_make.out
  </code></pre>
  
  <p>Since I was unsure what the problem is, I googled and found these</p>
  
  <ul>
  <li><p><a href="https://stackoverflow.com/questions/4304438/gem-install-failed-to-build-gem-native-extension-cant-find-header-files">gem install: Failed to build gem native extension (can&#39;t find header files)</a>  - the instructions here seem to be specific to the gem being installed.</p></li>
  <li><p><a href="https://stackoverflow.com/questions/15527092/how-to-install-json-gem-failed-to-build-gem-native-extension">How to install json gem - Failed to build gem native extension</a>   This seems to be slightly different error.</p></li>
  </ul>
  
  <p>Any hints? Thanks!</p>