Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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 ?

like image 579
Tristan Avatar asked Mar 15 '26 12:03

Tristan


2 Answers

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

sudo apt-get install ruby-dev
like image 112
elad silver Avatar answered Mar 18 '26 02:03

elad silver


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.

like image 35
Sathish Avatar answered Mar 18 '26 02:03

Sathish



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!