在安装了Xcode 4.2之后,无法使用原生扩展来构buildjson(1.6.3)

你是否熟悉这个错误? 我不知道如何解决这个问题:

Installing json (1.6.3) with native extensions Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. /Users/boris/.rvm/rubies/ruby-1.9.2-p290/bin/ruby extconf.rb creating Makefile make /usr/bin/gcc-4.2 -I. -I/Users/boris/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/x86_64-darwin10.8.0 -I/Users/boris/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1/ruby/backward -I/Users/boris/.rvm/rubies/ruby-1.9.2-p290/include/ruby-1.9.1 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -fno-common -O3 -ggdb -Wextra -Wno-unused-parameter -Wno-parentheses -Wpointer-arith -Wwrite-strings -Wno-missing-field-initializers -Wshorten-64-to-32 -Wno-long-long -fno-common -pipe -O3 -Wall -o parser.o -c parser.c make: /usr/bin/gcc-4.2: No such file or directory make: *** [parser.o] Error 1 Gem files will remain installed in /Users/boris/.rvm/gems/ruby-1.9.2-p290@apps2/gems/json-1.6.3 for inspection. Results logged to /Users/boris/.rvm/gems/ruby-1.9.2-p290@apps2/gems/json-1.6.3/ext/json/ext/parser/gem_make.out An error occured while installing json (1.6.3), and Bundler cannot continue. Make sure that `gem install json -v '1.6.3'` succeeds before bundling. 

系统信息:

 gem -v 1.8.10 $ ruby -v ruby 1.9.2p290 (2011-07-09 revision 32553) [x86_64-darwin10.8.0] 

Xcode v4.2.1

生成文件引用/usr/bin/gcc-4.2 …我通过创建一个符号链接到正确的可执行文件来解决这个问题:

 sudo ln -s /usr/bin/llvm-gcc-4.2 /usr/bin/gcc-4.2