Wednesday, June 30, 2010

Installing Postgres gem on Snow Leopard

I had to jump through a small hoop to install the postgres gem on Snow Leopard so I'm putting it here to help others out. Hopefully it saves you some time.


Basic System


  • Ruby 1.8.7
  • Macports
  • OSX 10.6 (Snow Leopard)

Install Postgresql


# sudo port install postgresql84-server

Install 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