When I run
Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
current directory: /usr/local/lib/ruby/gems/2.3.0/gems/pg-0.18.4/ext
/usr/local/opt/ruby/bin/ruby -r ./siteconf20160601-64492-1nt86nq.rb extconf.rb
checking for pg_config... no
No pg_config... trying anyway. If building fails, please try again with
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** 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.
... [a long list of config options] ...
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.
gem install pg -v '0.18.4'
Yes, in order to install the
pg gem you must have postgresql installed. You can find downloads and install instruction on their website.
Specifically it says you need a
pg_config file, which I guess woukd be created upon installation.