I am working on a rails app. Installed Postgresql using postgresql-9.1.2-1-osx.dmg Installed pg gem. Then when I executed rake db:create getting the
rake db:create
if you have upgraded PostgreSQL with homebrew (brew update && brew upgrade), then simply uninstall the pg gem:
gem uninstall pg bundle install
and the path will be corrected for you. No need to uninstall the whole PostgreSQL cluster.