4
votes

Good day I have a Mac with OSX Yosemite I'm trying to install the compass with the command:

sudo gem install compass

but I am getting the following error:

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 ./siteconf20151001-1122-1jqcu8r.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.10 for inspection.
Results logged to /Library/Ruby/Gems/2.0.0/extensions/universal-darwin-14/2.0.0/ffi-1.9.10/gem_make.out

before attempting to install the package I updated the gem with the command

sudo gem update --system

and the update occurred without errors

1
This is not a programming questionMarek H
I do not see any problem in performing any questions from other areas that are related to programmingVitor
Please read help "Questions about general computing hardware and software are off-topic for Stack Overflow unless they directly involve tools used primarily for programming."Marek H
The appropriate way to indicate that a problem is solved is by giving a checkmark to the correct answer, not by editing the question.cimmanon
I'm sorry but it's the first time I use this channel and still do not know the best use of , the next time I will do the right way , thanks Marek HVitor

1 Answers

12
votes

You probably need to install the command line developer tools first.

xcode-select --install

Then try sudo gem install compass again