Are you using PostgresApp and trying to install PostgreSQL gem and returning
Gem::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension. ?
I did this on Mavericks and worked. This can maybe happen on other versions of OS X.
gem install pg -- --with-pg-config="/Applications/Postgres.app/Contents/MacOS/bin/pg_config"
After do this I could bundle normally.