when you are using mac with postgresapp, there is a chance of this error
[code language=”ruby”]
gem install pg -v ‘0.21.0’ — –with-pg-config=/Applications/Postgres.app/Contents/Versions/latest/bin/pg_config
[/code]