On Tue, May 16, 2006 at 01:46:21PM +0200, David E. wrote:
} I’m having difficulty installing the “postgres” gem. postgres-pr
} installed fine, but whenever I run:
The postgres-pr does not have any native extension. The -pr stands for
Ruby. Your issue is with building the native extensions.
} sudo gem install postgres
} I get:
} ERROR: While executing gem … (RuntimeError)
} ERROR: Failed to build gem native extension.
} Gem files will remain installed in
} /usr/lib/ruby/gems/1.8/gems/postgres-0.7.1 for inspection.
} I’ve had a bit of a poke around, and gathered that the problem is gem
} not knowing where to find the postgres libraries and includes.
} I’ve tried various combinations of
} no luck so far. Has anyone encountered a smiliar problem and managed
} resolve it?
} I’m running ruby 1.8.4, rails 1.1.2, gem 0.8.11, and postgres 8.0. I
} also have the postgresql-dev package installed.
I’m working from Debian knowledge rather than Ubuntu knowledge, but
should be similar. First, have you tried installing libpgsql-ruby (or
libpgsql-ruby1.8)? Under Debian, it is the package for the Ruby driver
PostgreSQL in a system package rather than a gem. I usually prefer to
install system packages rather than gems when possible, especially those
with native extensions (e.g. librmagick-ruby).
If those packages do not exist in Ubuntu, be sure that ruby-dev (or
ruby1.8-dev) is installed, as well as libpq-dev, then try the gem
again. Again, I am working from Debian knowledge so it might not apply.
Good luck. If this doesn’t help I recommend consulting an Ubuntu mailing