gem install pg not working on Mac El Capitan
Try this:
- brew update
- brew install postgresql
- sudo gem install pg -v 'VERSION'
This worked for me:
sudo gem install pg -- --with-pg-config=/Applications/Postgres.app/Contents/Versions/9.4/bin/pg_config
Remember to change 9.4 to your postgres version, if different from 9.4.