Thursday, June 01, 2006

First Tiny Steps in Rails

Time to learn something about Ruby on Rails.

I started going through the tutorial, and had a minor hiccup that I thought I'd report.

We use PostgreSQL, so I wanted to use that as my db. This meant doing a gem install postgres to get the correct db adapter. Except I got many screens full of error messages.

At the top of these was:

postgres.c:18:22: error: libpq-fe.h: No such file or directory
postgres.c:19:70: error: libpq/libpq-fs.h: No such file or directory

so I went looking for how to tell it where the postgres include files are. Turns out that

gem install postgres -- --with-pgsql-include-dir=/usr/local/pgsql/include

is the simplest way, but you can also go into /usr/local/lib/ruby/gems/1.8/gems/postgres-0.7.1 and do this:

ruby extconf.rb --with-pgsql-include-dir=/usr/local/pgsql/include
make install


Post a Comment

<< Home