From: Rajinder Yadav Date: 2010-11-09T07:41:07+09:00 Subject: Re: ruby-pg gem fails to install On Mon, Nov 8, 2010 at 5:23 PM, Ben Bleything wrote: > On Mon, Nov 8, 2010 at 2:11 PM, Rajinder Yadav wrote: >> i tried the following >> >> sudo gem install pg -- >> --with-pgsql-include=/opt/postgresql-9.0.1/src/interfaces/libpq >> >> still getting an error, how do i tell it where to find the header files? > > Did you try just "sudo gem install pg"? I suspect you did and it > failed. At any rate, that's definitely not the correct path; you > probably want something like /opt/postgresql-9.0.1/include > > Run pg_config, it'll tell you what your include dir is. > > Ben > > i have tried the following not sure if my syntax is correct? i get the same error sudo gem install pg -- \ --with-pgsql-lib=/usr/local/pgsql/lib \ --with-pgsql-include=/usr/local/pgsql/include sudo gem install pg -- --with-pg-config=/opt/postgresql-9.0.1/src/bin/pg_config here is the output from pg_config BINDIR = /opt/postgresql-9.0.1/src/bin/pg_config DOCDIR = /usr/local/pgsql/share/doc HTMLDIR = /usr/local/pgsql/share/doc INCLUDEDIR = /usr/local/pgsql/include PKGINCLUDEDIR = /usr/local/pgsql/include INCLUDEDIR-SERVER = /usr/local/pgsql/include/server LIBDIR = /usr/local/pgsql/lib PKGLIBDIR = /usr/local/pgsql/lib LOCALEDIR = /usr/local/pgsql/share/locale MANDIR = /usr/local/pgsql/share/man SHAREDIR = /usr/local/pgsql/share SYSCONFDIR = /usr/local/pgsql/etc PGXS = /usr/local/pgsql/lib/pgxs/src/makefiles/pgxs.mk CONFIGURE = CC = gcc CPPFLAGS = -D_GNU_SOURCE CFLAGS = -O2 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -fno-strict-aliasing -fwrapv CFLAGS_SL = -fpic LDFLAGS = -Wl,--as-needed -Wl,-rpath,'/usr/local/pgsql/lib',--enable-new-dtags LDFLAGS_EX = LDFLAGS_SL = LIBS = -lpgport -lz -lreadline -lcrypt -ldl -lm VERSION = PostgreSQL 9.0.1 -- Kind Regards, Rajinder Yadav | DevMentor.org | Do Good! ~ Share Freely GNU/Linux: 2.6.35-22-generic Kubuntu x86_64 10.10 | KDE 4.5.1 Ruby 1.9.2p0 | Rails 3.0.1