title: Error installing Rails on Macbook Air OS 10.9
body: <p>I have been trying to install rails on my Macbook Air running OSX 10.9, but I keep running into errors.</p>
  
  <p>When I type </p>
  
  <blockquote>
    <p>$ gem -v</p>
  </blockquote>
  
  <p>I get</p>
  
  <blockquote>
    <p>2.0.3</p>
  </blockquote>
  
  <p>and</p>
  
  <blockquote>
    <p>$ rails -v</p>
  </blockquote>
  
  <p>yields</p>
  
  <blockquote>
    <p>Rails is not currently installed on this system. To get the latest version, simply type:
    <br> $ sudo gem install rails
    <br> You can then rerun your "rails" command.</p>
  </blockquote>
  
  <p>When I type </p>
  
  <blockquote>
    <p>$ gem install rails</p>
  </blockquote>
  
  <p>I get</p>
  
  <blockquote>
    <p>Fetching: i18n-0.6.9.gem (100%)
    <br>ERROR:  While executing gem ... (Gem::FilePermissionError)
    <br>You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.</p>
  </blockquote>
  
  <p>So I type</p>
  
  <blockquote>
    <p>$ sudo gem install rails</p>
  </blockquote>
  
  <p>I put in my password and I get</p>
  
  <blockquote>
    <p>Fetching: i18n-0.6.9.gem (100%)
    <br>Successfully installed i18n-0.6.9
    <br>Fetching: multi_json-1.8.2.gem (100%)
    <br>Successfully installed multi_json-1.8.2
    <br>Fetching: tzinfo-0.3.38.gem (100%)
    <br>Successfully installed tzinfo-0.3.38
    <br>Fetching: minitest-4.7.5.gem (100%)
    <br>Successfully installed minitest-4.7.5
    <br>Fetching: atomic-1.1.14.gem (100%)
    <br>Building native extensions.  This could take a while...
    <br>ERROR:  Error installing rails:
    <br>    ERROR: Failed to build gem native extension.
    <br>    /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby extconf.rb
    <br>mkmf.rb can't find header files for ruby at <br>/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/include/ruby.h</p>
  </blockquote>
  
  <p>and then I don't know what to do...</p>