Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
/Users/markhoyt/.rvm/rubies/ruby-2.0.0-p451/bin/ruby extconf.rb --with-pg-config=/usr/pgsql-9.1/bin/pg_config
Using config values from /usr/pgsql-9.1/bin/pg_config
sh: /usr/pgsql-9.1/bin/pg_config: No such file or directory
sh: /usr/pgsql-9.1/bin/pg_config: No such file or directory
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.
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=/Users/markhoyt/.rvm/rubies/ruby-2.0.0-p451/bin/ruby
--with-pg
--without-pg
--enable-windows-cross
--disable-windows-cross
--with-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}/
extconf failed, exit code 1
Gem files will remain installed in /Users/markhoyt/Desktop/KeyToLife/KeyToLife/KEYTOLIFEPG/KeyToLifeApp/vendor/bundle/ruby/2.0.0/gems/pg-0.18.1 for inspection.
Results logged to /Users/markhoyt/Desktop/KeyToLife/KeyToLife/KEYTOLIFEPG/KeyToLifeApp/vendor/bundle /ruby/2.0.0/extensions/x86_64-darwin-12/2.0.0-static/pg-0.18.1/gem_make.out
I have been working on this for two days now and have tried everything I can from stack overflow. I have installed the PG application, have tried to locate and set up a path with pg config and cannot get it right.
locate pg_config
/usr/local/Cellar/postgresql/9.4.1/bin/pg_config
/usr/local/Cellar/postgresql/9.4.1/include/ecpg_config.h
/usr/local/Cellar/postgresql/9.4.1/include/pg_config.h
/usr/local/Cellar/postgresql/9.4.1/include/pg_config_ext.h
/usr/local/Cellar/postgresql/9.4.1/include/pg_config_manual.h
/usr/local/Cellar/postgresql/9.4.1/include/pg_config_os.h
/usr/local/Cellar/postgresql/9.4.1/include/server/pg_config.h
/usr/local/Cellar/postgresql/9.4.1/include/server/pg_config_ext.h
/usr/local/Cellar/postgresql/9.4.1/include/server/pg_config_manual.h
/usr/local/Cellar/postgresql/9.4.1/include/server/pg_config_os.h
/usr/local/Cellar/postgresql/9.4.1/share/man/man1/pg_config.1
/usr/local/bin/pg_config
/usr/local/include/ecpg_config.h
/usr/local/include/pg_config.h
/usr/local/include/pg_config_ext.h
/usr/local/include/pg_config_manual.h
/usr/local/include/pg_config_os.h
/usr/local/share/man/man1/pg_config.1
Any help would be so appreciated!