My life just got easier thanks to Postgres.app (the easiest way to run #PostgreSQL on Mac) Thanks @craigkerstiens bit.ly/17jRh1a— Adam Stacoviak (@adamstac) June 3, 2013
There's an easier way
Just download, install and run the app when you want to run Postgres locally for development. I always found myself fumbling with commands like
pg_ctl -D /usr/local/var/postgres start or
pg_ctl -D /usr/local/var/postgres stop -s -m fast to start and stop my Postgres server. Running Postgres.app is a much simpler and easier user experience now. Just run the app when you're hacking, and quit the app when you're done. Simple.
The classic Postgres elephant icon will hang out in your system tray for easy access.
Heroku and Rails specifics
If you're hacking on a project and deploying to Heroku with a Postgres database, you'll need to run
heroku addons:add heroku-postgresql:dev to setup Postgres for your app before running something like
heroku run rake db:migrate.
For more details on using Postgres on Heroku check out postgres.heroku.com. You should also subscribe to Postgres Weekly - a free, once–weekly e-mail round-up of PostgreSQL news and articles curated by Craig Kerstiens.