我尝试运行 bundle install 并在 json gem 上停止。所以我尝试运行运行 sudo gem install json 1.7.3 这是它崩溃的版本,它给出了以下内容:
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
我已经尝试确保安装了命令行工具,但我对如何使用这个工具有点茫然。
任何帮助,将不胜感激。谢谢