Rails, Postgres, and Snow Leopard

Posted by gabe-fuzz

September 15 2009 at 1:59pm

Upon installing Snow Leopard I found that my postgres installation was no longer working.  Turns out a newer version of postgres (postgres84… I was using 83) was released and is compatible with Snow Leopard.  My postgres installation for Snow Leopard using macports looks like this:

sudo port install postgresql84-server


sudo mkdir -p /opt/local/var/db/postgresql84/defaultdb


sudo chown postgres:postgres /opt/local/var/db/postgresql84/defaultdb


sudo su postgres -c ‘/opt/local/lib/postgresql84/bin/initdb -D /opt/local/var/db/postgresql84/defaultdb’


sudo launchctl load -w /Library/LaunchDaemons/org.macports.postgresql84-server.plist


sudo launchctl start org.macports.postgresql84-server


psql84 -U postgres

And the postgres gem:

sudo env ARCHFLAGS=”-arch x86_64” gem install postgres — —with-pgsql-lib=/opt/local/lib/postgresql84 —with-pgsql-include=/opt/local/include/postgresql84

Twitter Updates

    via Twitter

    Categories

    Flickr