I tried using gem install pg but it doesn\'t seem to work.
gem install pg
gem install pg gives this error
Temporarily enhancing PATH to in
Use with ARCH flag.
ARCH
sudo env ARCHFLAGS="-arch x86_64" gem install pg
This resolved the same issue you are having.