请问大家一个问题,我执行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