title: gem install compass - Failed to build gem native extension
body: <p><strong>gem install compass - Failed to build gem native extension</strong>, as shown below within Terminal:</p>
  
  <pre><code>johnlove% gem install compass
  ERROR:  Error installing compass:
      ERROR: Failed to build gem native extension.
  </code></pre>
  
  <p>[THE BASICS]</p>
  
  <pre><code>[Macintosh:~] johnlove% which ruby
  /usr/bin/ruby
  [Macintosh:~] johnlove% which sass
  /usr/local/bin/sass
  [Macintosh:~] johnlove% which scss
  /usr/local/bin/scss
  [Macintosh:~] johnlove% which compass
  compass: Command not found.
  </code></pre>
  
  <p>[MORE BASICS]</p>
  
  <pre><code>[Macintosh:~] johnlove% sass -v
  Sass 3.5.5 (Bleeding Edge)
  [Macintosh:~] johnlove% scss -v
  Sass 3.5.5 (Bleeding Edge)
  [Macintosh:~] johnlove% ruby -v
  ruby 2.3.7p456 (2018-03-28 revision 63024) [universal.x86_64-darwin18]
  [Macintosh:~] johnlove% compass -v
  compass: Command not found.
  </code></pre>
  
  <p><strong>[UPDATE 2]</strong></p>
  
  <p>did this in Terminal:</p>
  
  <pre><code>sudo gem install -n /usr/local/bin compass
  </code></pre>
  
  <p>GOT THIS BACK</p>
  
  <pre><code>current directory: /Library/Ruby/Gems/2.3.0/gems/ffi-1.9.21/ext/ffi_c
  /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -I /Library/Ruby/Site/2.3.0 -r ./siteconf20190130-2612-nh9d7t.rb extconf.rb
  /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/universal-darwin18/rbconfig.rb:215: warning: Insecure world writable dir /usr/local/bin in PATH, mode 040757
  checking for ffi.h... no
  checking for ffi.h in /usr/local/include,/usr/include/ffi... no
  checking for shlwapi.h... no
  checking for rb_thread_blocking_region()... no
  checking for rb_thread_call_with_gvl()... yes
  checking for rb_thread_call_without_gvl()... yes
  creating extconf.h
  creating Makefile
  
  current directory: /Library/Ruby/Gems/2.3.0/gems/ffi-1.9.21/ext/ffi_c
  make "DESTDIR=" clean
  
  current directory: /Library/Ruby/Gems/2.3.0/gems/ffi-1.9.21/ext/ffi_c
  make "DESTDIR="
  Running autoreconf for libffi
  /Library/Ruby/Gems/2.3.0/gems/ffi-1.9.21/ext/ffi_c/libffi/autogen.sh: line 2: exec: autoreconf: not found
  make: *** ["/Library/Ruby/Gems/2.3.0/gems/ffi-1.9.21/ext/ffi_c/libffi-universal-darwin18"/.libs/libffi_convenience.a] Error 127
  
  make failed, exit code 2
  </code></pre>
  
  <p><strong>end [UPDATE 2]</strong></p>
  
  <p>=====</p>
  
  <p><strong>[UPDATE 1]</strong></p>
  
  <p>I read that my PATHS may not be set up correctly, so I ran:</p>
  
  <pre><code>gem env
  </code></pre>
  
  <p>and got back:</p>
  
  <pre><code>RubyGems Environment:
    - RUBYGEMS VERSION: 3.0.2
    - RUBY VERSION: 2.3.7 (2018-03-28 patchlevel 456) [universal.x86_64-darwin18]
    - INSTALLATION DIRECTORY: /Library/Ruby/Gems/2.3.0
    - USER INSTALLATION DIRECTORY: /Users/johnlove/.gem/ruby/2.3.0
    - RUBY EXECUTABLE: /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby
    - GIT EXECUTABLE: /usr/bin/git
    - EXECUTABLE DIRECTORY: /usr/bin
    - SPEC CACHE DIRECTORY: /Users/johnlove/.gem/specs
    - SYSTEM CONFIGURATION DIRECTORY: /Library/Ruby/Site
    - RUBYGEMS PLATFORMS:
      - ruby
      - universal-darwin-18
    - GEM PATHS:
       - /Library/Ruby/Gems/2.3.0
       - /Users/johnlove/.gem/ruby/2.3.0
       - /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/gems/2.3.0
    - GEM CONFIGURATION:
       - :update_sources =&gt; true
       - :verbose =&gt; true
       - :backtrace =&gt; false
       - :bulk_threshold =&gt; 1000
    - REMOTE SOURCES:
       - https://rubygems.org/
    - SHELL PATH:
       - /Library/Frameworks/Python.framework/Versions/Current/bin
       - /usr/local/bin
       - /usr/bin
       - /bin
       - /usr/sbin
       - /sbin
  </code></pre>
  
  <p>What am I supposed to be looking for if my PATHS are messed up?</p>
  
  <p>Another mystery?</p>
  
  <pre><code>sudo gem install compass
  </code></pre>
  
  <p>Got back?</p>
  
  <pre><code>ERROR:  While executing gem ... (Gem::FilePermissionError)
      You don't have write permissions for the /usr/bin directory.
  </code></pre>
  
  <p>I tried to create a LOCAL usr/local/bin directory with full Read and Write permissions.</p>
  
  <p>FAILED!</p>
  
  <p><strong>end [UPDATE 1]</strong></p>
  
  <p>=====</p>
  
  <p><strong>after getting the native extension error, I followed with</strong></p>
  
  <pre><code>compass -v compass: Command not found.
  </code></pre>
  
  <p>I downloaded and installed the compass.app which now appears in the menubar. I have even created a Compass Project for one of my non-sass projects.</p>
  
  <p>So, how does the Compass.app get successfully installed without the gem compass?</p>
  
  <p><strong>Tried his ...</strong></p>
  
  <pre><code>sudo gem update --system
  </code></pre>
  
  <p><strong>Got this back ...</strong></p>
  
  <pre><code>Latest version already installed. Done.
  </code></pre>
  
  <p><strong>Then, I tried this:</strong></p>
  
  <pre><code>sudo apt-get install ruby-dev
  </code></pre>
  
  <p><strong>Got this:</strong></p>
  
  <pre><code>apt-get: command not found
  </code></pre>
  
  <p><strong>I did do this:</strong></p>
  
  <pre><code>xcode-select --install
  </code></pre>
  
  <p>got back:</p>
  
  <pre><code>command line tools are already installed
  </code></pre>
  
  <p>I guess I cannot blame it on Xcode.</p>
  
  <p>Thanks in advance for saving my mind ...</p>