title: trouble installing rails on EC2
body: <p>I am trying to install rails on my EC2 instance. I installed gem after reinstalling ruby. I am running ruby version 1.8.7 and gem version 1.8.12. I am trying to install rails and getting the following error. </p>
  
  <hr>
  
  <p>*$ sudo gem install rails -v=3.1.1 Fetching: activesupport-3.1.1.gem (100%) Fetching: activemodel-3.1.1.gem (100%) Fetching: actionpack-3.1.1.gem (100%) Fetching: activerecord-3.1.1.gem (100%) Fetching: activeresource-3.1.1.gem (100%) Fetching: actionmailer-3.1.1.gem (100%) Building native extensions.  This could take a while... ERROR:  Error installing rails:  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.6.4 for inspection. Results logged to /usr/lib64/ruby/gems/1.8/gems/json-1.6.4/ext/json/ext/parser/gem_make.out*</p>
  
  <hr>
  
  <p>Any ideas?</p>
  
  <p>Thanks!</p>