我對Rails的世界相當陌生,想創建另一個項目來玩一些代碼。在運行'rails new myproject'時,我遇到了這個錯誤。我搜索了Google的解決方案,但沒有運氣。如何在運行「捆綁安裝」時通過此問題繼續創建我的Rails應用程序?錯誤:無法構建gem本機擴展。 JSON寶石
我運行:
OSX 10.7.5
的Rails 3.1.1
的Ruby 1.8.7(2012-02-08 PATCHLEVEL 358)萬向darwin11.0]
Using coffee-script (2.2.0) Using rack-ssl (1.3.3) Installing json (1.8.0) with native extensions Gem::Installer::ExtensionBuildError: 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-darwin11.0 -I/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/universal-darwin11.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 Error: No developer directory found at /Developer. Run /usr/bin/xcode-select to update the developer directory path. make: * [generator.o] Error 1
Gem files will remain installed in /Users/me/.bundler/tmp/1673/gems/json-1.8.0 for inspection. Results logged to /Users/me/.bundler/tmp/1673/gems/json-1.8.0/ext/json/ext/generator/gem_make.out An error occured while installing json (1.8.0), and Bundler cannot continue. Make sure that
gem install json -v '1.8.0'
succeeds before bundling.
我注意到這條線,但不知道這意味着什麼.. 錯誤:在/ Developer中找不到開發人員目錄。運行/ usr/bin/xcode-select更新開發者目錄路徑。
謝謝!
你運行的Xcode選? –
我不這麼認爲。我該怎麼做,在哪裏? –
從您的錯誤消息:'錯誤:在/ Developer中找不到開發人員目錄。運行/ usr/bin/xcode-select來更新開發者目錄路徑。「 - 你需要從任何地方訪問:'/ usr/bin/xcode-select' –