I'm trying to use the tutorial at: http://ruby.railstutorial.org/ruby-on-rails-tutorial-book?version=3.2#sec-install_ruby
When I do sudo gem install rails -v 3.2.9
I get this error:
Building native extensions. This could take a while... ERROR: Error installing rails: ERROR: Failed to build gem native extension. /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb creating Makefile make xcrun cc -I. -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin12.0 -I. -DJSON_GENERATOR -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -arch i386 -arch x86_64 -g -O3 -pipe -fno-common -DENABLE_DTRACE -fno-common -pipe -fno-common -c generator.c xcrun: Error: failed to exec real xcrun. (No such file or directory) cc -arch i386 -arch x86_64 -pipe -bundle -undefined dynamic_lookup -o generator.bundle generator.o -L. -L/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib -L. -arch i386 -arch x86_64 -lruby -lpthread -ldl -lobjc clang: error: no such file or directory: 'generator.o' make: *** [generator.bundle] Error 1 Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/json-1.7.5 for inspection. Results logged to /Library/Ruby/Gems/1.8/gems/json-1.7.5/ext/json/ext/generator/gem_make.out
I've installed command line tools
I've set sudo xcode-select -switch /usr/bin
which xcode-select /usr/bin/xcode-select
which cc /usr/bin/cc
any ideas? thanks!