For ease of management and upgrading, etc. I have used the (PostgreSQL Application on my Mac with the following gem install (same as yours above).
gem install pg -- --with-pg-config=/Applications/Postgres__version__.app/Contents/MacOS/bin/pg_config
I have had no issues with this approach (versus a custom install or via Homebrew from which I have had a few problems).