[問題] 執行bundle install出現錯誤

作者: turnps (哇哈哈)   2014-01-08 17:01:20
請問大家一個問題,我執行bundle install出現錯誤,
系統提示要我安裝 json '1.8.1',
安裝 json '1.8.1'時,
卻出現如下面的錯誤,找了一下午網路資料都無法解決這問題,
請問有人知道這要怎麼解決嗎??
我的環境是Mac OS X 10.9 Mavericks.
Joshteki-MacBook-Pro:demo josh$ gem install json -v '1.8.1'
Building native extensions. This could take a while...
ERROR: Error installing json:
ERROR: Failed to build gem native extension.
/usr/local/Cellar/ruby/1.9.3-p385/bin/ruby extconf.rb
creating Makefile
make clean
make
compiling generator.c
In file included from generator.c:1:
In file included from ./../fbuffer/fbuffer.h:5:
In file included from /usr/local/Cellar/ruby/1.9.3-p385/include/ruby-1.9.1/ruby.h:32:
/usr/local/Cellar/ruby/1.9.3-p385/include/ruby-1.9.1/ruby/ruby.h:48:11: fatal error: 'string.h' file not found
# include <string.h>
^
1 error generated.
make: *** [generator.o] Error 1
make failed, exit code 2
Gem files will remain installed in /usr/local/Cellar/ruby/1.9.3-p385/lib/ruby/gems/1.9.1/gems/json-1.8.1 for inspection.
Results logged to /usr/local/Cellar/ruby/1.9.3-p385/lib/ruby/gems/1.9.1/extensions/x86_64-darwin-11/1.9.1/json-1.8.1/gem_make.out
作者: jokester (蠻王科科)   2014-01-08 17:11:00
xcode和command line tools有裝嗎
作者: turnps (哇哈哈)   2014-01-08 17:15:00
有,都裝了
作者: jokester (蠻王科科)   2014-01-08 18:50:00
囧// 我沒注意到Cellar 呆了

Links booklink

Contact Us: admin [ a t ] ucptt.com