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.
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.
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.
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.