Nooby stumped on installing ruby-pg gem

Complete Ruby noob, here. I want to go after postgres from Ruby on
Windows to support a Ruby team. After a lot of googling trying to figure
out how to get the ruby-pg gem loaded I finally noticed the Gem Package
Manager application in the Ruby programs menu tree. Yeah!

In the package manager I executed “gem install pg” and saw it installed
successfully. Yeah!!

“gem list --local” now shows PG. Yeah!!!

Running the fxri console,

require ‘rake’ ==> true Yeah!!!

require ‘pg’
==>
LoadError: 126: The specified module could not be found. -
C:/Ruby/lib/ruby/gems/1.8/gems/pg-0.8.0-x86-mswin32-60/lib/pg.so
from C:/Ruby/lib/ruby/gems/1.8/gems/pg-0.8.0-x86-mswin32-60/lib/pg.so
from C:/Ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
`require’
from (irb):6
from :0

OK, here I am stumped. It seems to be finding pg OK, but is otherwise
unhappy… any hints are welcome.

kenny

Roger P. wrote:

GL.
=r

Thx, that helped. Got the gem installed but then got a complaint that
LIBPQ.dll was not found and when I stuffed one in it complained about
PQcancel not being defined in libpq.dll. Maybe I can find a better one.

Thx again, kt

Kenneth T. wrote:

require ‘pg’
==>
LoadError: 126: The specified module could not be found. -
C:/Ruby/lib/ruby/gems/1.8/gems/pg-0.8.0-x86-mswin32-60/lib/pg.so

That probably doesn’t mean pg isn’t installed, but that a dependency it
relies on isn’t [or wrong version].
http://blog.smajn.net/2009/07/installing-ruby-191-rails-232-and.html
might help.
GL.
=r

On Jul 15, 7:26 pm, Kenneth T. [email protected] wrote:

might help.
GL.
=r

Thx, that helped. Got the gem installed but then got a complaint that
LIBPQ.dll was not found and when I stuffed one in it complained about
PQcancel not being defined in libpq.dll. Maybe I can find a better one.

Maybe the gem has been built against a different version of
PostgreSQL.

Please verify at the gem project page (or contact the author using the
forums) about the supported versions of PostgreSQL:

http://rubyforge.org/projects/ruby-pg/


Luis L.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs