I tried using gem install pg
but it doesn\'t seem to work.
gem install pg
gives this error
Temporarily enhancing PATH to in
Use with ARCH
flag.
sudo env ARCHFLAGS="-arch x86_64" gem install pg
This resolved the same issue you are having.
I've been experiencing this annoying problem with PG for years. I created this gist to help.
The following command always work for me.
# Substitute Postgres.app/Contents/Versions/9.5 with appropriate version number
sudo ARCHFLAGS="-arch x86_64" gem install pg -- --with-pg-config=/Applications/Postgres.app/Contents/Versions/9.5/bin/pg_config
gist: https://gist.github.com/sharnie/5588340cf023fb177c8d