# Nooby stumped on installing ruby-pg gem

**URL:** <https://www.ruby-forum.com/t/nooby-stumped-on-installing-ruby-pg-gem/172160>\
**Category:** Ruby\
**Created:** [July 15, 2009, 10:01pm UTC](https://www.ruby-forum.com/t/nooby-stumped-on-installing-ruby-pg-gem/172160 "2009-07-15T22:01:02Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kenneth\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/3ec8ea/32.png) [@Kenneth\_T](https://www.ruby-forum.com/u/Kenneth_T)\
**Post date:** [July 15, 2009, 10:01pm UTC](https://www.ruby-forum.com/t/nooby-stumped-on-installing-ruby-pg-gem/172160/1 "2009-07-15T22:01:02Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Kenneth\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/3ec8ea/32.png) [@Kenneth\_T](https://www.ruby-forum.com/u/Kenneth_T)\
**Post date:** [July 16, 2009, 12:31am UTC](https://www.ruby-forum.com/t/nooby-stumped-on-installing-ruby-pg-gem/172160/2 "2009-07-16T00:31:12Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Kenneth\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/3ec8ea/32.png) [@Kenneth\_T](https://www.ruby-forum.com/u/Kenneth_T)\
**Post date:** [July 15, 2009, 10:13pm UTC](https://www.ruby-forum.com/t/nooby-stumped-on-installing-ruby-pg-gem/172160/3 "2009-07-15T22:13:32Z")

</div>

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](http://blog.smajn.net/2009/07/installing-ruby-191-rails-232-and.html)  
might help.  
GL.  
=r

---

<div class="post-metadata">

**Author:** ![Kenneth\_T](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/k/3ec8ea/32.png) [@Kenneth\_T](https://www.ruby-forum.com/u/Kenneth_T)\
**Post date:** [July 16, 2009, 2:21am UTC](https://www.ruby-forum.com/t/nooby-stumped-on-installing-ruby-pg-gem/172160/4 "2009-07-16T02:21:00Z")

</div>

On Jul 15, 7:26 pm, Kenneth T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) 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/](http://rubyforge.org/projects/ruby-pg/)

–  
Luis L.
