I followed the instructions on the thread here but I still have the following error message:

Ayman$ rails -v 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. Ayman$ gem install rails Building native extensions. This could take a while... ERROR: Error installing rails: ERROR: Failed to build gem native extension. /Users/Ayman/.rvm/rubies/ruby-2.0.0-p353/bin/ruby extconf.rb *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/Users/Ayman/.rvm/rubies/ruby-2.0.0-p353/bin/ruby --with-atomic_reference-dir --without-atomic_reference-dir --with-atomic_reference-include --without-atomic_reference-include=${atomic_reference-dir}/include --with-atomic_reference-lib --without-atomic_reference-lib=${atomic_reference-dir}/ /Users/Ayman/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/mkmf.rb:434:in `try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /Users/Ayman/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/mkmf.rb:519:in `try_link0' from /Users/Ayman/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/mkmf.rb:817:in `try_run' from extconf.rb:26:in `<main>' Gem files will remain installed in /Users/Ayman/.rvm/gems/ruby-2.0.0-p353/gems/atomic-1.1.14 for inspection. Results logged to /Users/Ayman/.rvm/gems/ruby-2.0.0-p353/gems/atomic-1.1.14/ext/gem_make.out Ayman$

I am on the latest version of gems, running ruby 2.0.0, and Mac 10.8.

Any clue on what I am doing wrong?

Update

So I installed Xcode Command Line Tool per the following and am still recieving the following error message:

Ayman$ sudo gem install rails Building native extensions. This could take a while... ERROR: Error installing rails: ERROR: Failed to build gem native extension. /Users/Ayman/.rvm/rubies/ruby-2.0.0-p353/bin/ruby extconf.rb *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/Users/Ayman/.rvm/rubies/ruby-2.0.0-p353/bin/ruby --with-atomic_reference-dir --without-atomic_reference-dir --with-atomic_reference-include --without-atomic_reference-include=${atomic_reference-dir}/include --with-atomic_reference-lib --without-atomic_reference-lib=${atomic_reference-dir}/ /Users/Ayman/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/mkmf.rb:434:in `try_do': The compiler failed to generate an executable file. (RuntimeError) You have to install development tools first. from /Users/Ayman/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/mkmf.rb:519:in `try_link0' from /Users/Ayman/.rvm/rubies/ruby-2.0.0-p353/lib/ruby/2.0.0/mkmf.rb:817:in `try_run' from extconf.rb:26:in `<main>' Gem files will remain installed in /Users/Ayman/.rvm/rubies/ruby-2.0.0- p353/lib/ruby/gems/2.0.0/gems/atomic-1.1.14 for inspection. Results logged to /Users/Ayman/.rvm/rubies/ruby-2.0.0- p353/lib/ruby/gems/2.0.0/gems/atomic-1.1.14/ext/gem_make.out

Ayman$

UPDATE TWO

Followed rbenv install below per the following: