Forum: Ruby on Rails Postgres-pr interface not found

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
96f5de71a8111ed44d251e869270fc03?d=identicon&s=25 Blake Miller (blakeage)
on 2007-04-18 23:17
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
96f5de71a8111ed44d251e869270fc03?d=identicon&s=25 Blake Miller (blakeage)
on 2007-04-18 23:33
> 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.
This topic is locked and can not be replied to.