简体   繁体   中英

Error installing compass. Failed to build gem native extension (Compass)

After installation of SASS, i did :

gem install compass

And this error appears.

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

Do you have a solution ?

我有同样的问题,如果你像我一样使用ubuntu(我的是ubuntu 14),试试这个:

sudo apt-get install ruby-dev

I had faced the same issues, after going through the following Link , i have installed the Xcode and my issues is resolved.

Try to install Xcode or apple developer tools.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM