2013-09-21 42 views
2

在这个命令之后sudo gem install cocoapods我得到下面的错误。使用Xcode 5和Xcode 4.6.3的CocoaPods安装问题

我认为它连接到Xcode 5的错误路径。当我安装它时,我将它保存在桌面上,但它们将它移动到Application文件夹。我使用Xcode 4.6.3以及Xcode 5.我怎样才能改变路径来解决这个问题。命令行工具安装在两个XCode上。

Building native extensions. This could take a while... 
ERROR: Error installing cocoapods: 
    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: could not stat active Xcode path '/Users/alex/Desktop/Xcode 5.app/Contents/Developer'. (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.8.0 for inspection. 
Results logged to /Library/Ruby/Gems/1.8/gems/json-1.8.0/ext/json/ext/generator/gem_make.out 

回答

6

我已经运行在终端

须藤的Xcode选-switch命令/Applications/Xcode.app

它为我工作