title: When I try sudo gem install json I get the following error
body: <p>I need to install the JSON gem to start my app but I get the error below whenever I try to install the json gem.  Can anyone help me out.  I'm using rails 2.2.2 and gems 1.3.1.</p>
  
  <pre><code>Arions-macbook-pro:.ssh arion$ sudo gem install json
  Password:
  Sorry, try again.
  Password:
  Building native extensions.  This could take a while...
  ERROR:  Error installing json:
      ERROR: Failed to build gem native extension.
  
  /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb install json
  can't find header files for ruby.
  
  
  Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/json-1.1.4 for inspection.
  Results logged to /Library/Ruby/Gems/1.8/gems/json-1.1.4/ext/json/ext/parser/gem_make.out
  </code></pre>