Possible Duplicate:
OS X Mountain Lion: gcc-4.2 No such file or directory
I'm facing a problem to install rails on my MAC.
I'm learning RoR by myself but I can't install rails.
This is what I did: 1 - Installed XCode and downloaded 'Command Line Tools'
2 - Installed RVM with this code:
curl -L https://get.rvm.io | bash -s stable
3 - Installed HomeBrew and libksba:
ruby <(curl -fsSkL raw.github.com/mxcl/homebrew/go)
brew install libksba
4 - Installed Ruby with RVM (RVM command only worked after I restarted the system):
rvm install 1.9.3
5 - Defined Ruby 1.9.3 as default:
rvm --default 1.9.3
6 - Now I'm trying to run this code:
gem install rails
But it returns this error:
Guerreiro:~ rguerreiro$ gem install rails Building native extensions. This could take a while... ERROR: Error installing rails: ERROR: Failed to build gem native extension.
/Users/rguerreiro/.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/rguerreiro/.rvm/gems/ruby-1.9.3-p194/gems/json-1.7.5 for inspection. Results logged to /Users/rguerreiro/.rvm/gems/ruby-1.9.3-p194/gems/json-1.7.5/ext/json/ext/generator/gem_make.out