Menu icon Foundation
Compass not installing through cli

Hello all,

i am attempting to use the CLI in order to create a foundation project i have successfully installed everything before "gem install compass". when i run the command it gives me this error.

"While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory."

does anyone know why this is happening ? I even ran it like "sudo gem install compass" and i get this error

"Error installing compass:
ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby 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

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/gems/ffi-1.9.10/ext/ffi_c/gem_make.out
"

If anyone knows how i could resolve this i would really appreciate it .

compassclierror

Hello all,

i am attempting to use the CLI in order to create a foundation project i have successfully installed everything before "gem install compass". when i run the command it gives me this error.

"While executing gem ... (Gem::FilePermissionError)
You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory."

does anyone know why this is happening ? I even ran it like "sudo gem install compass" and i get this error

"Error installing compass:
ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby 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

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/gems/ffi-1.9.10/ext/ffi_c/gem_make.out
"

If anyone knows how i could resolve this i would really appreciate it .

Harout over 3 years ago

I found a solution here:

http://stackoverflow.com/questions/22544754/failed-to-build-gem-native-extension-installing-compass

In order to install compass On Mac OS X 10.10 (Yosemite)had to perform the following:

  1. Set Up Ruby Environment

Ensure ruby is installed and up to date: ruby -v
Update gem's sudo gem update --system
2. Set Up MAC Environment

-Install the Xcode Command Line Tools this is the key to install Compass. xcode-select --install

-Installing the Xcode Command Line Tools are the key to getting Compass working on OS X

  1. Install Compass

sudo gem install compass