title: error: failed to build gem native extension when installing rails on mac mountian lion os
body: <p>I've recently updated to Mountain Lion and re-installed Ruby, but when I try to run a test Rails app, I get an error message that says that "Rails is not currently installed" on my system. I do what it says, type <code>sudo gem install rails</code> and get:</p>
  
  <pre><code>cleared faster_require caches due to new gem install...
  Successfully installed rails-3.2.7
  1 gem installed
  Installing ri documentation for rails-3.2.7...
  Installing RDoc documentation for rails-3.2.7...
  </code></pre>
  
  <p>But when I check to see which rails version is install, here is what I get: </p>
  
  <pre><code>Rails is not currently installed on this system. To get the latest version, simply type:
  
      $ sudo gem install rails
  
  You can then rerun your "rails" command.
  </code></pre>
  
  <p>I've also tried <code>gem install rails</code> and get:</p>
  
  <pre><code>Building native extensions.  This could take a while...
  ERROR:  Error installing rails:
      ERROR: Failed to build gem native extension.
  
          /Users/aileen/.rvm/rubies/ruby-1.9.3-p194/bin/ruby extconf.rb
  creating Makefile
  
  make
  compiling generator.c
  make: /usr/bin/gcc-4.2: No such file or directory
  make: *** [generator.o] Error 1
  
  
  Gem files will remain installed in /Users/aileen/.rvm/gems/ruby-1.9.3-p194@rails327/gems/json-1.7.4 for inspection.
  Results logged to /Users/aileen/.rvm/gems/ruby-1.9.3-p194@rails327/gems/json-1.7.4/ext/json/ext/generator/gem_make.out
  </code></pre>