Compass installation error. Failed to create custom gem extension (Compass)

After installing 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?

+3


source to share


2 answers


I faced the same problems, after following the following link , I installed Xcode and my problems are resolved.



Try to install Xcode or apple developer tools.

+2


source


I had the same problem, if you are using ubuntu (mine is ubuntu 14) as I am, try this:



sudo apt-get install ruby-dev

      

+7


source







All Articles