small medium large xlarge

10 Jun 2009, 17:58
David Wilbur (50 posts)

i am not convinced that the instructions for postgres on the book page 321 are current.

if you look at the bottom of the page:

also see:

this project was last updated on March 29, 2009

the recommended adapter in the book is retrieved from here, correct?

which has not been modified since 2006. also, after a lot of trying, i would say is not buildable against the current version of postgres (8.3.7 atm)

also note, in the comments for ruby-pg, that the old gem “postgres” has been superseded with ruby-pg. however they are still currently maintaining the postgres gem.

also you might want to read this: and for those of you using ruby 1.9

lastly, if you are trying to install the ruby-pg gem, i found that making sure that the postgres bin directory that you are using is on the path when you install is of use… if you use non standard location for postgres. i install postgres in version specific directories eg: /usr/local/pgsql/8.3.7 vs the default /usr/local/pgsql i am guessing that it needs that to find pg_config. also the current gem should be installed as “gem install pg” not “gem install ruby-pg” which will get you the older gem… as if you had typed “gem install postgres”. hope that is clear…

so… this is what i did as root that was successful:

export PATH=/usr/local/pgsql/8.3.7/bin/:$PATH /usr/local/bin/gem install pg

You must be logged in to comment