在安装Bundler过程中出现了错误:

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/ruby.h:24:10: fatal error: 'ruby/config.h' file not found
#include "ruby/config.h"
^
1 error generated.
make: *** [generator.o] Error 1

原因是:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby目录下缺少config.h文件

解决方法:
拷贝xcode中的该配置文件到/usr/local/include目录下。
命令如下:
sudo cp -rf /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15/ruby /usr/local/include/

PS: /System/Library 目录是有系统保护,禁止修改的,因此拷贝到/usr/local/include即可。

Trackback

no comment untill now

Add your comment now