Postgresql will not install on OSX here is my data below
n error occurred while installing pg (0.18.4), and Bundler cannot continue.
Make sure that gem ins
This basically means that you're missing a library or program on your setup. I've had this issue a couple of times now so here are a few different things to try (hopefully one of them will work for you):
Install a common missing library:
brew install libpqxx
gem install pg
Reinstall postgres (not ideal I know):
brew uninstall postgresql
brew install postgresql
gem install pg
Explicitly define path of pg_config:
1) Get location of pg_config
which pg_config
2) pass that path into gem install
gem install pg --with-pg-config=/usr/pgsql-9.1/bin/pg_config