install do_postgres on OSX Leopard

March 3, 2010 by pedro mota

Install notes for [Datamapper](“http://www.datamapper.org" “Datamapper”) do_postgres driver ruby gem on severall operating systems:

Apple OSX Snow Leopard

System Version: Mac OS X 10.6.2 Kernel Version: Darwin 10.2.0 (No Macports; No Homebrew) [PosgreSQL](“http://www.postgresql.org" “PostgreSQL”) 8.4

I wanted to have [PosgreSQL](“http://www.postgresql.org" “PostgreSQL”) server working on the Mac so that development is easier. There is a .dmg package from the guys at [EnterpriseDB](“http://www.enterprisedb.com/" “EnterpriseDB”) that is a single click install. Check it at their [downloads](“http://www.enterprisedb.com/products/download.do") page. Get it. Install it. Everything goes into:

/Library/PostgreSQL/8.4

Now to install the do_postgres gem, I had to set the $PATH to:

$ export PATH=$PATH:/Library/PostgreSQL/8.4/bin

Now, installing the gem from [rubygems.org](“http://rubygems.org" “Rubygems”) should work:

$ gem install do_postgres

or ```sudo env ARCHFLAGS=‘-arch i386’ gem install do_postgres


Remember in OSX where your gems are installed, with or without root access using:

$ gem environment


### Debian 5.0 Lenny

I have [PosgreSQL]("http://www.postgresql.org" "PostgreSQL") 8.3 on my [Debian]("http://www.debian.org" "Debian") servers, from the repositories. To install the `do_postgres` gem, you must get the header files for _libpq5_ (PostgreSQL library):

$ sudo apt-get install libpq_dev $ sudo gem install do_postgres


### Ubuntu 9.10 Karmic Koala

I have [PosgreSQL]("http://www.postgresql.org" "PostgreSQL") 8.4 on my [Ubuntu]("http://www.ubuntu.com" "Ubuntu") servers, from the repositories. To install the `do_postgres` gem, you must get the header files for _libpq5_ (PostgreSQL library):

$ sudo apt-get install libpq_dev $ sudo gem install do_postgres ```

(blogged from [Vim](“http://www.vim.org/scripts/script.php?script_id=2030" “Vimblog”))

© 2018 | Follow on Twitter | pedro mg & Hugo