title: package configuration for libffi is not found in macOS while installing travis-cli
body: <p>I am trying to install <code>gem install travis</code> to use <code>travis-cli</code> as per reference <a href="https://rubygems.org/gems/travis" rel="noreferrer">https://rubygems.org/gems/travis</a> but getting below error.</p>
  <p>Tried solution mentioned here <a href="https://github.com/ffi/ffi/issues/653" rel="noreferrer">https://github.com/ffi/ffi/issues/653</a> :</p>
  <pre><code>brew reinstall libffi
  export LDFLAGS=&quot;-L/usr/local/opt/libffi/lib&quot;
  export PKG_CONFIG_PATH=&quot;/usr/local/opt/libffi/lib/pkgconfig&quot;
  gem install travis
  </code></pre>
  <blockquote>
  <p>package configuration for libffi is not found
  &quot;xcrun clang -o conftest -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/universal-darwin16 -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/backward -I/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0 -I. -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_ATOMIC_BUILTINS -iwithsysroot /usr/local/libressl/include conftest.c  -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib -L.             -L /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.Internal.sdk/usr/local/libressl/lib -L/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.Internal.sdk/usr/local/lib   -arch x86_64 -arch i386   -lruby.2.3.0  -lpthread -ldl -lobjc &quot;
  In file included from conftest.c:1:
  In file included from /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby.h:33:
  /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/include/ruby-2.3.0/ruby/ruby.h:24:10: fatal error: 'ruby/config.h' file not found
  #include &quot;ruby/config.h&quot;
  ^~~~~~~~~~~~~~~
  1 error generated.
  checked program was:
  /* begin */
  1: #include &quot;ruby.h&quot;
  2:
  3: int main(int argc, char *<em>argv)
  4: {
  5:   return 0;
  6: }
  /</em> end */</p>
  </blockquote>
  <p>Any help will be appreciated! try finding out but didn't find helpful</p>