我正在尝试使用以下教程:http ://ruby.railstutorial.org/ruby-on-rails-tutorial-book?version=3.2#sec-install_ruby
当我这样做时,sudo gem install rails -v 3.2.9
我收到此错误:
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
我已经安装了命令行工具
我已经设置了 sudo xcode-select -switch /usr/bin
哪个 xcode-select /usr/bin/xcode-select
哪个抄送/usr/bin/cc
有任何想法吗?谢谢!