I have installed Ruby, latest version.
I have installed XCode, latest version.
I have installed CommandLine tools for XCode too.
Then I want to install Ruby on Rails, but I got the following error:
Fetching: json-1.7.5.gem (100%) Building native extensions. This
could take a while… ERROR: Error installing rails: ERROR: Failed
to build gem native extension./Users/JonyIve/.rvm/rubies/ruby-1.9.3-p327/bin/ruby extconf.rb creating Makefilemake compiling generator.c make: /usr/bin/gcc-4.2: No such file or
directory make: * [generator.o] Error 1Gem files will remain installed in
/Users/JonyIve/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/gems/1.9.1/gems/json-1.7.5
for inspection. Results logged to
/Users/JonyIve/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/gems/1.9.1/gems/json-1.7.5/ext/json/ext/generator/gem_make.out
I think I had this problem when I was setting up rails env on newly installed 10.8 mac. Command Line tool was installed, but gcc is still missing.
I refereed to some blog posts: (i.e. Beryllium Work) that recommended to create link to the location that the make script is looking for:
I think this solved my problem on installing rails