作者turnps (哇哈哈)
看板Ruby
标题[问题] 执行bundle install出现错误
时间Wed Jan 8 17:01:20 2014
请问大家一个问题,我执行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
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.92.62.179
1F:→ jokester:xcode和command line tools有装吗 01/08 17:11
2F:→ turnps:有,都装了 01/08 17:15
3F:→ jokester:囧// 我没注意到Cellar 呆了 01/08 18:50