安装Compass出错。构建本地扩展宝石失败(Compass)。

3
在安装完SASS之后,我执行了以下操作:
gem install compass

这个错误出现了。
Building native extensions.  This could take a while...
ERROR:  Error installing compass:
ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20140818-5119-rfb64z.rb extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/include/ruby.h

extconf failed, exit code 1

Gem files will remain installed in /Library/Ruby/Gems/2.0.0/gems/ffi-1.9.3 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-13/2.0.0/ffi-1.9.3/gem_make.out

你有解决方案吗?
2个回答

7

我遇到了同样的问题,如果你和我一样使用的是Ubuntu(我的版本是Ubuntu 14),请尝试以下方法:

sudo apt-get install ruby-dev

2

我曾经面临相同的问题,在查看了以下链接后,我安装了Xcode,我的问题得到了解决。

尝试安装Xcode或Apple开发者工具。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接