Postgresql pg on Ubuntu - missing 'pg_ext'

Hello,
I try to use Ruby and Postgresql on Ubuntu Lucid. I had issues for
installing the pg gem (pg-0.10.1), but now it works, cause seemed to be
different versions for ruby and gem.

Now when I try to require pg (require ‘pg’), I get this error :
/var/lib/gems/1.9.0/gems/pg-0.10.1/lib/pg.rb:4:in `require’: no such
file to load – pg_ext (LoadError)

I tried to search on the web without success, and have no idea of what
to do to fix that.

On Feb 28, 7:06am, “Yoann M.” [email protected] wrote:

Hello,
I try to use Ruby and Postgresql on Ubuntu Lucid. I had issues for
installing the pg gem (pg-0.10.1), but now it works, cause seemed to be
different versions for ruby and gem.

Now when I try to require pg (require ‘pg’), I get this error :
/var/lib/gems/1.9.0/gems/pg-0.10.1/lib/pg.rb:4:in `require’: no such
file to load – pg_ext (LoadError)

is /var/lib/gems/1.9.0 correct?

Are you using Ruby 1.9.0?

I would recommend you upgrade your version of Ruby to at least 1.9.1
since 1.9.0 was a developer preview of 1.9.x codebase and there are
chances the gem didn’t compile properly under it.

Can you post the mkmf.log that exist in /var/lib/gems/1.9.0/gems/
pg-0.10.1/ext folder?

That will help us determine if the extension required by pg gem (that
is part of it) compiled successfully.

2011/2/28 Yoann M. [email protected]:

to do to fix that.
It just works fine in my system (Ubuntu 64 bits). Check that pg_ext
exists in gems/pg-0.10.1/lib/ directory.

Yoann M. wrote in post #984399:

Now when I try to require pg (require ‘pg’), I get this error :
/var/lib/gems/1.9.0/gems/pg-0.10.1/lib/pg.rb:4:in `require’: no such
file to load – pg_ext (LoadError)

Mea culpa, the gem command was using gem1.8 and I use ruby1.9, I just
removed /usr/bin/gem and recreated the good link using gem1.9.

Thanks for your help.