How to Install and Use Postgres On OS X For Ruby and Rails Development
I hang out in #nwrug on Freenode, the IRC channel of a Ruby user group here in the UK, and floated the idea of doing a PostgreSQL (a.k.a. Postgres) installation tutorial for Ruby Inside. Coincidentally, it turned out 37signals sysadmin Will Jessop was already working on one so, I present.. Setting up PostgreSQL for Ruby on Rails development on OS X by Will Jessop :-)
Will's post is a walkthrough of the process from sitting at an empty terminal prompt through to having a barebones Rails 3 app running on a Postgres powered database. It's entirely Mac OS X focused, so don't expect to enjoy it too much if you're on Linux or Windows!
- installation (super simple with Homebrew)
- start/stop controls for OS X
- user creation
- database setup
- installing the
Or, the Screencast!
I still wanted to bring something to the table despite Will's work so I asked if I could make a screencast that roughly followed the same lines as his tutorial and he was up for it. So, I present, a scrappy 13 minute video alternative to the above tutorial:
My walkthrough is somewhat different. I spend a couple of minutes explaining what Postgres is, in case you're not familiar with it, and I use Mike Perham's awesome launchctl controller Lunchy to manage the starting and stopping of Postgres instead of the usual (and arcane) Apple tools. I also make references to Rebecca Black and Mister Mister.
While preparing for this post, I've found a lot of small, useful Ruby libraries that improve the Postgres experience. I'm collecting those together and will be posting with a grab-bag of useful links soon.