title: Cannot find rake, but gem is installed. Already did bundle update, etc
body: <p>I'm trying to run bundle exec rake db:migrate and have been for awhile now and I keep getting this issue. Any ideas? I already tried bundle install, bundle update, etc. I've attached my gemfile too so you can see. Could it be something with my gemfile.lock?</p>
  
  <pre><code>sample_app LMagnotti$ bundle exec rake db:migrate
  Could not find rake-11.1.2 in any of the sources
  Run `bundle install` to install missing gems.
  </code></pre>
  
  <p>Gemfile</p>
  
  <pre><code>source 'https://rubygems.org'
  gem 'rails', '4.2.2'
  gem 'sass-rails', '~&gt; 5.0'
  gem 'uglifier', '&gt;= 1.3.0'
  gem 'coffee-rails', '~&gt; 4.1.0'
  gem 'bootstrap-sass', '~&gt; 3.2.0.0'
  gem 'jquery-rails'
  gem 'turbolinks'
  gem 'jbuilder', '~&gt; 2.0'
  gem 'sdoc', '~&gt; 0.4.0' 
  gem 'pg', '0.18.4'
  gem 'rake', '11.1.2'
  
  group :development do
    gem 'byebug'
    gem 'web-console', '~&gt; 2.0'
    gem 'spring'
    gem 'sqlite3', '1.3.7'
  end
  </code></pre>
  
  <p>Gemfile Lock</p>
  
  <pre><code>GEM
    remote: https://rubygems.org/
    specs:
      actionmailer (4.2.2)
        actionpack (= 4.2.2)
        actionview (= 4.2.2)
        activejob (= 4.2.2)
        mail (~&gt; 2.5, &gt;= 2.5.4)
        rails-dom-testing (~&gt; 1.0, &gt;= 1.0.5)
      actionpack (4.2.2)
        actionview (= 4.2.2)
        activesupport (= 4.2.2)
        rack (~&gt; 1.6)
        rack-test (~&gt; 0.6.2)
        rails-dom-testing (~&gt; 1.0, &gt;= 1.0.5)
        rails-html-sanitizer (~&gt; 1.0, &gt;= 1.0.1)
      actionview (4.2.2)
        activesupport (= 4.2.2)
        builder (~&gt; 3.1)
        erubis (~&gt; 2.7.0)
        rails-dom-testing (~&gt; 1.0, &gt;= 1.0.5)
        rails-html-sanitizer (~&gt; 1.0, &gt;= 1.0.1)
      activejob (4.2.2)
        activesupport (= 4.2.2)
        globalid (&gt;= 0.3.0)
      activemodel (4.2.2)
        activesupport (= 4.2.2)
        builder (~&gt; 3.1)
      activerecord (4.2.2)
        activemodel (= 4.2.2)
        activesupport (= 4.2.2)
        arel (~&gt; 6.0)
      activesupport (4.2.2)
        i18n (~&gt; 0.7)
        json (~&gt; 1.7, &gt;= 1.7.7)
        minitest (~&gt; 5.1)
        thread_safe (~&gt; 0.3, &gt;= 0.3.4)
        tzinfo (~&gt; 1.1)
      arel (6.0.3)
      binding_of_caller (0.7.2)
        debug_inspector (&gt;= 0.0.1)
      bootstrap-sass (3.2.0.2)
        sass (~&gt; 3.2)
      builder (3.2.2)
      byebug (9.0.3)
      coffee-rails (4.1.1)
        coffee-script (&gt;= 2.2.0)
        railties (&gt;= 4.0.0, &lt; 5.1.x)
      coffee-script (2.4.1)
        coffee-script-source
        execjs
      coffee-script-source (1.10.0)
      concurrent-ruby (1.0.2)
      debug_inspector (0.0.2)
      erubis (2.7.0)
      execjs (2.6.0)
      globalid (0.3.6)
        activesupport (&gt;= 4.1.0)
      i18n (0.7.0)
      jbuilder (2.4.1)
        activesupport (&gt;= 3.0.0, &lt; 5.1)
        multi_json (~&gt; 1.2)
      jquery-rails (4.1.1)
        rails-dom-testing (&gt;= 1, &lt; 3)
        railties (&gt;= 4.2.0)
        thor (&gt;= 0.14, &lt; 2.0)
      json (1.8.3)
      loofah (2.0.3)
        nokogiri (&gt;= 1.5.9)
      mail (2.6.4)
        mime-types (&gt;= 1.16, &lt; 4)
      mime-types (3.0)
        mime-types-data (~&gt; 3.2015)
      mime-types-data (3.2016.0221)
      mini_portile2 (2.0.0)
      minitest (5.8.4)
      multi_json (1.12.0)
      nokogiri (1.6.7.2)
        mini_portile2 (~&gt; 2.0.0.rc2)
      pg (0.18.4)
      rack (1.6.4)
      rack-test (0.6.3)
        rack (&gt;= 1.0)
      rails (4.2.2)
        actionmailer (= 4.2.2)
        actionpack (= 4.2.2)
        actionview (= 4.2.2)
        activejob (= 4.2.2)
        activemodel (= 4.2.2)
        activerecord (= 4.2.2)
        activesupport (= 4.2.2)
        bundler (&gt;= 1.3.0, &lt; 2.0)
        railties (= 4.2.2)
        sprockets-rails
      rails-deprecated_sanitizer (1.0.3)
        activesupport (&gt;= 4.2.0.alpha)
      rails-dom-testing (1.0.7)
        activesupport (&gt;= 4.2.0.beta, &lt; 5.0)
        nokogiri (~&gt; 1.6.0)
        rails-deprecated_sanitizer (&gt;= 1.0.1)
      rails-html-sanitizer (1.0.3)
        loofah (~&gt; 2.0)
      railties (4.2.2)
        actionpack (= 4.2.2)
        activesupport (= 4.2.2)
        rake (&gt;= 0.8.7)
        thor (&gt;= 0.18.1, &lt; 2.0)
      rake (11.1.2)
      rdoc (4.2.2)
        json (~&gt; 1.4)
      sass (3.4.22)
      sass-rails (5.0.4)
        railties (&gt;= 4.0.0, &lt; 5.0)
        sass (~&gt; 3.1)
        sprockets (&gt;= 2.8, &lt; 4.0)
        sprockets-rails (&gt;= 2.0, &lt; 4.0)
        tilt (&gt;= 1.1, &lt; 3)
      sdoc (0.4.1)
        json (~&gt; 1.7, &gt;= 1.7.7)
        rdoc (~&gt; 4.0)
      spring (1.7.1)
      sprockets (3.6.0)
        concurrent-ruby (~&gt; 1.0)
        rack (&gt; 1, &lt; 3)
      sprockets-rails (3.0.4)
        actionpack (&gt;= 4.0)
        activesupport (&gt;= 4.0)
        sprockets (&gt;= 3.0.0)
      sqlite3 (1.3.7)
      thor (0.19.1)
      thread_safe (0.3.5)
      tilt (2.0.4)
      turbolinks (2.5.3)
        coffee-rails
      tzinfo (1.2.2)
        thread_safe (~&gt; 0.1)
      uglifier (3.0.0)
        execjs (&gt;= 0.3.0, &lt; 3)
      web-console (2.3.0)
        activemodel (&gt;= 4.0)
        binding_of_caller (&gt;= 0.7.2)
        railties (&gt;= 4.0)
        sprockets-rails (&gt;= 2.0, &lt; 4.0)
  
  PLATFORMS
    ruby
  
  DEPENDENCIES
    bootstrap-sass (~&gt; 3.2.0.0)
    byebug
    coffee-rails (~&gt; 4.1.0)
    jbuilder (~&gt; 2.0)
    jquery-rails
    pg (= 0.18.4)
    rails (= 4.2.2)
    rake (= 11.1.2)
    sass-rails (~&gt; 5.0)
    sdoc (~&gt; 0.4.0)
    spring
    sqlite3 (= 1.3.7)
    turbolinks
    uglifier (&gt;= 1.3.0)
    web-console (~&gt; 2.0)
  
  BUNDLED WITH
     1.12.0
  </code></pre>
  
  <p>I went an uninstalled rake, then re-installed. Now when I run db:migrate, I see this</p>
  
  <pre><code>sample_app LMagnotti$ bundle exec rake db:migrate
  Could not find i18n-0.7.0 in any of the sources
  Run `bundle install` to install missing gems.
  </code></pre>
  
  <p>When I run bundle install now, this is what I'm seeing: </p>
  
  <pre><code>An error occurred while installing pg (0.18.4), and Bundler cannot continue.
  Make sure that `gem install pg -v '0.18.4'` succeeds before bundling.
  </code></pre>
  
  <p>Then I installed it...</p>
  
  <pre><code>Building native extensions.  This could take a while...
  Successfully installed pg-0.18.4
  Parsing documentation for pg-0.18.4
  Done installing documentation for pg after 2 seconds
  1 gem installed
  </code></pre>
  
  <p>After bundle update, I'm now getting hit with this error: </p>
  
  <pre><code>Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
  
      current directory: /Users/LMagnotti/workspace/sample_app/vendor/cache/ruby/2.0.0/gems/pg-0.18.4/ext
  /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby -r ./siteconf20160516-9499-1ex1lm8.rb extconf.rb
  checking for pg_config... yes
  Using config values from /usr/local/bin/pg_config
  checking for libpq-fe.h... yes
  checking for libpq/libpq-fs.h... yes
  checking for pg_config_manual.h... yes
  checking for PQconnectdb() in -lpq... no
  checking for PQconnectdb() in -llibpq... no
  checking for PQconnectdb() in -lms/libpq... no
  Can't find the PostgreSQL client library (libpq)
  *** extconf.rb failed ***
  Could not create Makefile due to some reason, probably lack of necessary
  libraries and/or headers.  Check the mkmf.log file for more details.  You may
  need configuration options.
  
  Provided configuration options:
      --with-opt-dir
      --without-opt-dir
      --with-opt-include
      --without-opt-include=${opt-dir}/include
      --with-opt-lib
      --without-opt-lib=${opt-dir}/lib
      --with-make-prog
      --without-make-prog
      --srcdir=.
      --curdir
      --ruby=/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/bin/ruby
      --with-pg
      --without-pg
      --enable-windows-cross
      --disable-windows-cross
      --with-pg-config
      --without-pg-config
      --with-pg_config
      --without-pg_config
      --with-pg-dir
      --without-pg-dir
      --with-pg-include
      --without-pg-include=${pg-dir}/include
      --with-pg-lib
      --without-pg-lib=${pg-dir}/
      --with-pqlib
      --without-pqlib
      --with-libpqlib
      --without-libpqlib
      --with-ms/libpqlib
      --without-ms/libpqlib
  
  To see why this extension failed to compile, please check the mkmf.log which can be found here:
  
    /Users/LMagnotti/workspace/sample_app/vendor/cache/ruby/2.0.0/extensions/universal-darwin-15/2.0.0/pg-0.18.4/mkmf.log
  
  extconf failed, exit code 1
  
  Gem files will remain installed in /Users/LMagnotti/workspace/sample_app/vendor/cache/ruby/2.0.0/gems/pg-0.18.4 for inspection.
  Results logged to /Users/LMagnotti/workspace/sample_app/vendor/cache/ruby/2.0.0/extensions/universal-darwin-15/2.0.0/pg-0.18.4/gem_make.out
  Installing tilt 2.0.4
  Installing spring 1.7.1
  Installing sqlite3 1.3.7 with native extensions
  Installing rdoc 4.2.2
  Installing tzinfo 1.2.2
  Installing nokogiri 1.6.7.2 with native extensions
  Installing rack-test 0.6.3
  Installing mime-types 3.0
  Installing binding_of_caller 0.7.2 with native extensions
  Installing bootstrap-sass 3.2.0.2
  Installing coffee-script 2.4.1
  Installing uglifier 3.0.0
  Installing sprockets 3.6.0
  An error occurred while installing pg (0.18.4), and Bundler cannot continue.
  Make sure that `gem install pg -v '0.18.4'` succeeds before bundling.
  </code></pre>
  
  <p>The log then says this: </p>
  
  <pre><code>find_executable: checking for pg_config... -------------------- yes
  
  --------------------
  
  "xcrun clang -o conftest -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15 -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0 -I. -I/usr/local/Cellar/postgresql/9.5.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_SYNC_BUILTINS conftest.c  -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib -L/usr/local/lib -L. -L/usr/local/lib   -arch i386 -arch x86_64   -lruby.2.0.0  -lpthread -ldl -lobjc "
  checked program was:
  /* begin */
  1: #include "ruby.h"
  2: 
  3: int main(int argc, char **argv)
  4: {
  5:   return 0;
  6: }
  /* end */
  
  "xcrun clang -o conftest -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15 -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0 -I. -I/usr/local/Cellar/postgresql/9.5.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_SYNC_BUILTINS conftest.c  -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib -L/usr/local/lib -L. -L/usr/local/lib   -arch i386 -arch x86_64   -lruby.2.0.0  -Wl,-rpath,/usr/local/lib -lpthread -ldl -lobjc "
  checked program was:
  /* begin */
  1: #include "ruby.h"
  2: 
  3: int main() {return 0;}
  /* end */
  
  find_header: checking for libpq-fe.h... -------------------- yes
  
  "xcrun clang -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15 -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0 -I. -I/usr/local/Cellar/postgresql/9.5.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_SYNC_BUILTINS  -arch i386 -arch x86_64  -c conftest.c"
  checked program was:
  /* begin */
  1: #include "ruby.h"
  2: 
  3: #include &lt;libpq-fe.h&gt;
  /* end */
  
  --------------------
  
  find_header: checking for libpq/libpq-fs.h... -------------------- yes
  
  "xcrun clang -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15 -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0 -I. -I/usr/local/Cellar/postgresql/9.5.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_SYNC_BUILTINS  -arch i386 -arch x86_64  -c conftest.c"
  checked program was:
  /* begin */
  1: #include "ruby.h"
  2: 
  3: #include &lt;libpq/libpq-fs.h&gt;
  /* end */
  
  --------------------
  
  find_header: checking for pg_config_manual.h... -------------------- yes
  
  "xcrun clang -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15 -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0 -I. -I/usr/local/Cellar/postgresql/9.5.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_SYNC_BUILTINS  -arch i386 -arch x86_64  -c conftest.c"
  checked program was:
  /* begin */
  1: #include "ruby.h"
  2: 
  3: #include &lt;pg_config_manual.h&gt;
  /* end */
  
  --------------------
  
  have_library: checking for PQconnectdb() in -lpq... -------------------- no
  
  "xcrun clang -o conftest -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15 -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0 -I. -I/usr/local/Cellar/postgresql/9.5.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_SYNC_BUILTINS conftest.c  -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib -L/usr/local/lib -L. -L/usr/local/lib -Wl,-rpath,/usr/local/lib   -arch i386 -arch x86_64   -lruby.2.0.0 -lpq  -lpthread -ldl -lobjc "
  ld: warning: ignoring file /usr/local/lib/libpq.dylib, file was built for x86_64 which is not the architecture being linked (i386): /usr/local/lib/libpq.dylib
  Undefined symbols for architecture i386:
    "_PQconnectdb", referenced from:
        _t in conftest-07e7b9.o
  ld: symbol(s) not found for architecture i386
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  checked program was:
  /* begin */
   1: #include "ruby.h"
   2: 
   3: #include &lt;libpq-fe.h&gt;
   4: 
   5: /*top*/
   6: extern int t(void);
   7: int t(void) { void ((*volatile p)()); p = (void ((*)()))PQconnectdb; return 0; }
   8: int main(int argc, char **argv)
   9: {
  10:   if (argc &gt; 1000000) {
  11:     printf("%p", &amp;t);
  12:   }
  13: 
  14:   return 0;
  15: }
  /* end */
  
  "xcrun clang -o conftest -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15 -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0 -I. -I/usr/local/Cellar/postgresql/9.5.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_SYNC_BUILTINS conftest.c  -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib -L/usr/local/lib -L. -L/usr/local/lib -Wl,-rpath,/usr/local/lib   -arch i386 -arch x86_64   -lruby.2.0.0 -lpq  -lpthread -ldl -lobjc "
  conftest.c:7:27: error: too few arguments to function call, single argument 'conninfo' was not specified
  int t(void) { PQconnectdb(); return 0; }
                ~~~~~~~~~~~ ^
  /usr/local/Cellar/postgresql/9.5.2/include/libpq-fe.h:250:1: note: 'PQconnectdb' declared here
  extern PGconn *PQconnectdb(const char *conninfo);
  ^
  1 error generated.
  checked program was:
  /* begin */
   1: #include "ruby.h"
   2: 
   3: #include &lt;libpq-fe.h&gt;
   4: 
   5: /*top*/
   6: extern int t(void);
   7: int t(void) { PQconnectdb(); return 0; }
   8: int main(int argc, char **argv)
   9: {
  10:   if (argc &gt; 1000000) {
  11:     printf("%p", &amp;t);
  12:   }
  13: 
  14:   return 0;
  15: }
  /* end */
  
  --------------------
  
  have_library: checking for PQconnectdb() in -llibpq... -------------------- no
  
  "xcrun clang -o conftest -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15 -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0 -I. -I/usr/local/Cellar/postgresql/9.5.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_SYNC_BUILTINS conftest.c  -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib -L/usr/local/lib -L. -L/usr/local/lib -Wl,-rpath,/usr/local/lib   -arch i386 -arch x86_64   -lruby.2.0.0 -llibpq  -lpthread -ldl -lobjc "
  ld: library not found for -llibpq
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  checked program was:
  /* begin */
   1: #include "ruby.h"
   2: 
   3: #include &lt;libpq-fe.h&gt;
   4: 
   5: /*top*/
   6: extern int t(void);
   7: int t(void) { void ((*volatile p)()); p = (void ((*)()))PQconnectdb; return 0; }
   8: int main(int argc, char **argv)
   9: {
  10:   if (argc &gt; 1000000) {
  11:     printf("%p", &amp;t);
  12:   }
  13: 
  14:   return 0;
  15: }
  /* end */
  
  "xcrun clang -o conftest -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15 -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0 -I. -I/usr/local/Cellar/postgresql/9.5.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_SYNC_BUILTINS conftest.c  -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib -L/usr/local/lib -L. -L/usr/local/lib -Wl,-rpath,/usr/local/lib   -arch i386 -arch x86_64   -lruby.2.0.0 -llibpq  -lpthread -ldl -lobjc "
  conftest.c:7:27: error: too few arguments to function call, single argument 'conninfo' was not specified
  int t(void) { PQconnectdb(); return 0; }
                ~~~~~~~~~~~ ^
  /usr/local/Cellar/postgresql/9.5.2/include/libpq-fe.h:250:1: note: 'PQconnectdb' declared here
  extern PGconn *PQconnectdb(const char *conninfo);
  ^
  1 error generated.
  checked program was:
  /* begin */
   1: #include "ruby.h"
   2: 
   3: #include &lt;libpq-fe.h&gt;
   4: 
   5: /*top*/
   6: extern int t(void);
   7: int t(void) { PQconnectdb(); return 0; }
   8: int main(int argc, char **argv)
   9: {
  10:   if (argc &gt; 1000000) {
  11:     printf("%p", &amp;t);
  12:   }
  13: 
  14:   return 0;
  15: }
  /* end */
  
  --------------------
  
  have_library: checking for PQconnectdb() in -lms/libpq... -------------------- no
  
  "xcrun clang -o conftest -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15 -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0 -I. -I/usr/local/Cellar/postgresql/9.5.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_SYNC_BUILTINS conftest.c  -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib -L/usr/local/lib -L. -L/usr/local/lib -Wl,-rpath,/usr/local/lib   -arch i386 -arch x86_64   -lruby.2.0.0 -lms/libpq  -lpthread -ldl -lobjc "
  ld: library not found for -lms/libpq
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  checked program was:
  /* begin */
   1: #include "ruby.h"
   2: 
   3: #include &lt;libpq-fe.h&gt;
   4: 
   5: /*top*/
   6: extern int t(void);
   7: int t(void) { void ((*volatile p)()); p = (void ((*)()))PQconnectdb; return 0; }
   8: int main(int argc, char **argv)
   9: {
  10:   if (argc &gt; 1000000) {
  11:     printf("%p", &amp;t);
  12:   }
  13: 
  14:   return 0;
  15: }
  /* end */
  
  "xcrun clang -o conftest -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/universal-darwin15 -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0/ruby/backward -I/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/include/ruby-2.0.0 -I. -I/usr/local/Cellar/postgresql/9.5.2/include -D_XOPEN_SOURCE -D_DARWIN_C_SOURCE -D_DARWIN_UNLIMITED_SELECT -D_REENTRANT    -g -Os -pipe -DHAVE_GCC_SYNC_BUILTINS conftest.c  -L. -L/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib -L/usr/local/lib -L. -L/usr/local/lib -Wl,-rpath,/usr/local/lib   -arch i386 -arch x86_64   -lruby.2.0.0 -lms/libpq  -lpthread -ldl -lobjc "
  conftest.c:7:27: error: too few arguments to function call, single argument 'conninfo' was not specified
  int t(void) { PQconnectdb(); return 0; }
                ~~~~~~~~~~~ ^
  /usr/local/Cellar/postgresql/9.5.2/include/libpq-fe.h:250:1: note: 'PQconnectdb' declared here
  extern PGconn *PQconnectdb(const char *conninfo);
  ^
  1 error generated.
  checked program was:
  /* begin */
   1: #include "ruby.h"
   2: 
   3: #include &lt;libpq-fe.h&gt;
   4: 
   5: /*top*/
   6: extern int t(void);
   7: int t(void) { PQconnectdb(); return 0; }
   8: int main(int argc, char **argv)
   9: {
  10:   if (argc &gt; 1000000) {
  11:     printf("%p", &amp;t);
  12:   }
  13: 
  14:   return 0;
  15: }
  /* end */
  
  --------------------
  </code></pre>