有时候在ruby下使用gem安装包的时候,会报错如下:
ERROR: Error installing bluecloth:
ERROR: Failed to build gem native extension.
/System/Library/Frameworks/Ruby.framework/Versions/2.1/usr/bin/ruby
extconf.rb
mkmf.rb can't find header files for ruby at
/System/Library/Frameworks/Ruby.framework/Versions/2.1/usr/lib/ruby/ruby.h
如果是在centos等系统下面,执行命令:yum install ruby-devel
如果是在Ubuntu等系统下面,执行命令:apt-get isntall ruby-dev