OS X Yosemite: Fixes for developers

Apple released OS X Yosemite to the public for free yesteday. So far, it isn’t bad. But, as a Web developer, I’ve hit a few bumps on the way, even during installation. Hopefully, if you’re a developer too, you’ll be wiser than me, do some research before installing, and maybe then this article will be of use to you.

This list isn’t meant to be exhaustive. I’m simply a Web developer often writing in Ruby nowadays, and I wish other Web developers will get back on track fast if they encounter the problems I have.… Continue reading “OS X Yosemite: Fixes for developers”

OS X, Homebrew, PostgreSQL: Work around false running report by launchctl

Logos of OS X, PostgreSQL, and Homebrew.

You have PostgreSQL installed with Homebrew on OS X. After you restarted your Mac, somehow Rails or other apps using PostgreSQL will report the server is not running while trying to start it with launchctl will say otherwise.

Turns out, the .plist file used by launchctl is only checking for the existance of the .pid file written by PostgreSQL when starting up. If you don’t shut down PostgreSQL before restarting the computer, that file will stay there. When your Mac starts up again, launchctl will see that .pidContinue reading “OS X, Homebrew, PostgreSQL: Work around false running report by launchctl”

PostgreSQL on OS X with Homebrew: Upgrade database from 9.2 to 9.3.1

I installed PostgreSQL on OS X using Homebrew a while ago.

After running brew update, I didn’t realise PostgreSQL was updated from 9.2 to 9.3.1. What I also didn’t know was the new database format of the new version was incompatible with the older. Hence, the log of PostgreSQL indicated an error when I tried to start it:

The data directory was initialized by PostgreSQL version 9.2, which is not compatible with this version 9.3.1.

I had to use pg_upgrade to upgrade the database.… Continue reading “PostgreSQL on OS X with Homebrew: Upgrade database from 9.2 to 9.3.1”