Menu icon Foundation
Compass install error

Hi guys just trying to get compass installed on my machine again after wiping clean i had to reinstall to OSX Lion because I have an older slower computer. Not sure if thats the problem or something else but im getting this error when i do sudo gem install compass:

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/1.8/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h

Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/ffi-1.9.8 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/ffi-1.9.8/ext/ffi_c/gem_make.out

gem install

Hi guys just trying to get compass installed on my machine again after wiping clean i had to reinstall to OSX Lion because I have an older slower computer. Not sure if thats the problem or something else but im getting this error when i do sudo gem install compass:

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/1.8/usr/bin/ruby extconf.rb
mkmf.rb can't find header files for ruby at /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/ruby.h

Gem files will remain installed in /Library/Ruby/Gems/1.8/gems/ffi-1.9.8 for inspection.
Results logged to /Library/Ruby/Gems/1.8/gems/ffi-1.9.8/ext/ffi_c/gem_make.out

Rafi Benkual over 4 years ago

Looks like it is the older Ruby version that is causing the issue. I use rbenv to manage Ruby versions https://github.com/sstephenson/rbenv

Ryan Hellerud over 4 years ago

I also tried updating ruby with brew install and got another error:

Warning: No developer tools installed.
You should install the Command Line Tools.
The standalone package can be obtained from
https://developer.apple.com/downloads
or it can be installed via Xcode's preferences.
==> Installing dependencies for ruby: pkg-config, readline, libyaml, make
==> Installing ruby dependency: pkg-config
==> Downloading https://homebrew.bintray.com/bottles/pkg-config-0.28.lion.bottle
Already downloaded: /Library/Caches/Homebrew/pkg-config-0.28.lion.bottle.2.tar.gz
==> Pouring pkg-config-0.28.lion.bottle.2.tar.gz
sh: -L: invalid option
Usage: sh [GNU long option] [option] ...
sh [GNU long option] [option] script-file ...
GNU long options:
--debug
--debugger
--dump-po-strings
--dump-strings
--help
--init-file
--login
--noediting
--noprofile
--norc
--posix
--protected
--rcfile
--restricted
--verbose
--version
--wordexp
Shell options:
-irsD or -c command or -O shopt_option (invocation only)
-abefhkmnptuvxBCHP or -o option
Error: Failure while executing: -L /usr/local/Cellar/pkg-config/0.28/bin/pkg-config
Warning: Bottle installation failed: building from source.
Error: pkg-config cannot be built with any available compilers.
To install this formula, you may need to:
brew install gcc