Error trying to install Ruby postgres gems on OS/X

From: Mike Christensen <mike(at)kitchenpc(dot)com>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: Error trying to install Ruby postgres gems on OS/X
Date: 2011-01-29 01:37:23
Message-ID: AANLkTi=uF=OQBJ-ujcFoGYOY3dFyCo7R6Q0G1ok894qh@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm trying to install the Postgres gem on OS/X but getting errors no
matter what I try.. In theory, it should be as simple as "gem install
postgres", correct? Here's what I get:

>sudo gem install postgres
Building native extensions. This could take a while...
ERROR: Error installing postgres:
ERROR: Failed to build gem native extension.

/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby extconf.rb
extconf.rb:73: command not found: pg_config --bindir

=========== WARNING ===========

You are building this extension on OS X without setting the
ARCHFLAGS environment variable, and PostgreSQL does not appear
to have been built as a universal binary. If you are seeing this
message, that means that the build will probably fail.

Try setting the environment variable ARCHFLAGS
to '-arch i386' before building.

For example:
(in bash) $ export ARCHFLAGS='-arch i386'
(in tcsh) $ setenv ARCHFLAGS '-arch i386'

Then try building again.

===================================
extconf.rb:46: command not found: pg_config --includedir
extconf.rb:53: command not found: pg_config --libdir
checking for main() in -lpq... no
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of
necessary libraries and/or headers. Check the mkmf.log file for more
details. You may need configuration options.

Provided configuration options:
--with-opt-dir
--without-opt-dir
--with-opt-include
--without-opt-include=${opt-dir}/include
--with-opt-lib
--without-opt-lib=${opt-dir}/lib
--with-make-prog
--without-make-prog
--srcdir=.
--curdir
--ruby=/System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/bin/ruby
--with-pgsql-dir
--without-pgsql-dir
--with-pgsql-include
--without-pgsql-include=${pgsql-dir}/include
--with-pgsql-lib
--without-pgsql-lib=${pgsql-dir}/lib
--with-pqlib
--without-pqlib
Could not find PostgreSQL build environment (libraries & headers):
Makefile not created

Gem files will remain installed in
/Library/Ruby/Gems/1.8/gems/postgres-0.7.9.2008.01.28 for inspection.
Results logged to
/Library/Ruby/Gems/1.8/gems/postgres-0.7.9.2008.01.28/ext/gem_make.out

I have Postgres 9.0 installed at /Library/PostgreSQL/9.0. Any ideas?

Mike

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Thom Brown 2011-01-29 01:46:33 Re: Error trying to install Ruby postgres gems on OS/X
Previous Message Andrew Sullivan 2011-01-29 00:37:46 Re: Re: Separating the ro directory of the DB engine itself from the rw data areas . . .