我試着運行bundle安裝,並停止在json gem上。所以,我試圖運行sudo的運行安裝寶石JSON 1.7.3這是它墜毀在它的版本,它提供了以下:在山獅上安裝json gem時遇到麻煩
unknown109addaae0a6:introhive Jody$ sudo gem install json
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h
Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/json-1.7.3 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/json-1.7.3/ext/json/ext/parser/gem_make.out
然後,如果我看gem_make.out文件,它看起來是這樣的:
/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h
我試圖確保命令行工具已安裝,但我在如何得到這一個有點損失。
任何幫助,將不勝感激。謝謝
也許你應該看看這個:http://stackoverflow.com/a/761755/1454769 – David
謝謝,我看了一下,但我已經安裝了命令行工具,並且無法爲Mountain Lion獲得非llvm gcc。我甚至嘗試從源代碼下載並構建非llvm gcc。 –