Problem:
No pg_config... trying anyway. If building fails, please try again with
--with-pg-config=/path/to/pg_config
checking for libpq-fe.h... no
Can't find the 'libpq-fe.h header
*** extconf.rb failed ***
Try this:
$ locate libpq-fe.h
/Library/PostgreSQL/10/include/libpq-fe.h
Then:
$ gem install pg -- --with-opt-include=/Library/PostgreSQL/10/include
SUCCESS!