# Postgres-pr interface not found

**URL:** <https://www.ruby-forum.com/t/postgres-pr-interface-not-found/92387>\
**Category:** Rails\
**Created:** [April 18, 2007, 11:17pm UTC](https://www.ruby-forum.com/t/postgres-pr-interface-not-found/92387 "2007-04-18T23:17:16Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![blakeage](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/b38774/32.png) [@blakeage](https://www.ruby-forum.com/u/blakeage)\
**Post date:** [April 18, 2007, 11:17pm UTC](https://www.ruby-forum.com/t/postgres-pr-interface-not-found/92387/1 "2007-04-18T23:17:16Z")

</div>

I’ve installed the postgres-pr gem, and it is found using gem list  
v0.4.0.

In my active record source, inside the postgresql\_adapter.rb file, I’ve  
changed line 7 from:  
require\_library\_or\_gem ‘postgres’ unless  
self.class.const\_defined?(:PGconn)

to:  
require\_library\_or\_gem ‘postgres-pr’ unless  
self.class.const\_defined?(:PGconn)

…to try and force it to use the postgres-pr interface, but I get the  
following error when loading a page:  
no such file to load – postgres-pr

Why can’t it find that gem?

OSX 10.4.X - app server  
Winblows XP - db server

---

<div class="post-metadata">

**Author:** ![blakeage](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/b/b38774/32.png) [@blakeage](https://www.ruby-forum.com/u/blakeage)\
**Post date:** [April 18, 2007, 11:33pm UTC](https://www.ruby-forum.com/t/postgres-pr-interface-not-found/92387/2 "2007-04-18T23:33:08Z")

</div>

> Why can’t it find that gem?  
> I seem to have gotten around it by putting the full path to the gem, and  
> dropping the “-pr” from the gem (since there is no postgres-pr.rb file,  
> but there is a postgres.rb file in the postgres-pr folder).

New code is:  
require\_library\_or\_gem  
‘/usr/local/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres’  
unless self.class.const\_defined?(:PGconn)

Interesting that it can’t find a gem based on the name that lists when  
you execute “gem list”. But it’s more likely indicative of my noob  
understanding of the require\_library\_or\_gem function.
