Failed to build gem native extension (installing Compass) Failed to build gem native extension (installing Compass) ruby ruby

Failed to build gem native extension (installing Compass)


Try this, then try to install compass again

apt-get install ruby-dev


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

3. Install Compass

sudo gem install compass


The best way is sudo apt-get install ruby-compass to install compass.