title: Trouble installing pg
body: <p>I've been trying to install an api that says to use </p>
  
  <pre><code>bundle install
  rails s
  </code></pre>
  
  <p>But when I do bundle, I get this error:</p>
  
  <pre><code>An error occurred while installing pg (0.18.1), and Bundler cannot 
  continue. Make sure that `gem install pg -v '0.18.1' --source 'https://rubygems.org/'`succeeds before bundling.
  </code></pre>
  
  <p>But when I run that gem install command, I get this:</p>
  
  <p>ERROR:  Error installing pg:
      ERROR: Failed to build gem native extension.</p>
  
  <pre><code>current directory: /Library/Ruby/Gems/2.3.0/gems/pg-0.18.1/ext /System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/bin/ruby -r ./siteconf20191018-63874-el2g8s.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.
  </code></pre>
  
  <p>And the mkmf.log file says: </p>
  
  <pre><code>ld: warning: directory not found for option '-L/BuildRoot/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.Internal.sdk/usr/local/libressl/lib'
  </code></pre>
  
  <p>I'm not really sure where to start, as I've followed a good amount of other guides online and they either don't work or lead me to new errors.</p>