# PostgreSQL 8.2 and Rails/Ruby?

**URL:** <https://www.ruby-forum.com/t/postgresql-8-2-and-rails-ruby/80450>\
**Category:** Rails\
**Created:** [December 27, 2006, 1:41am UTC](https://www.ruby-forum.com/t/postgresql-8-2-and-rails-ruby/80450 "2006-12-27T01:41:00Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![hunter\_h](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/bc79bd/32.png) [@hunter\_h](https://www.ruby-forum.com/u/hunter_h)\
**Post date:** [December 27, 2006, 1:41am UTC](https://www.ruby-forum.com/t/postgresql-8-2-and-rails-ruby/80450/1 "2006-12-27T01:41:00Z")

</div>

Howdy,

Have any of the PostgreSQL users here upgraded to 8.2 and used it  
with Rails apps?

So far my tests show that it seems to work just fine but I thought I  
would ask before moving closer to deploying it in production.

Cheers,  
Hunter

---

<div class="post-metadata">

**Author:** ![hunter\_h](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/bc79bd/32.png) [@hunter\_h](https://www.ruby-forum.com/u/hunter_h)\
**Post date:** [December 31, 2006, 7:45am UTC](https://www.ruby-forum.com/t/postgresql-8-2-and-rails-ruby/80450/2 "2006-12-31T07:45:47Z")

</div>

I’ve been unable to get Postgres 8.2 working. Fedora Core 4, Rails  
1.1.6, ruby 1.8.4, ruby-postgres gem. I get the error uninitialized  
constant: PGConn

Don’t know if this is a Rails problem or the ruby-postgres bindings.

---

<div class="post-metadata">

**Author:** ![hunter\_h](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/bc79bd/32.png) [@hunter\_h](https://www.ruby-forum.com/u/hunter_h)\
**Post date:** [January 8, 2007, 8:28pm UTC](https://www.ruby-forum.com/t/postgresql-8-2-and-rails-ruby/80450/3 "2007-01-08T20:28:57Z")

</div>

Hunter H. wrote:

> Howdy,
> 
> Have any of the PostgreSQL users here upgraded to 8.2 and used it  
> with Rails apps?
> 
> So far my tests show that it seems to work just fine but I thought I  
> would ask before moving closer to deploying it in production.
> 
> Cheers,  
> Hunter

8.2 will not work with the current postgres ruby driver. Whoever is  
maintaining the gem has to update the gem to look for libpq.5.dylib  
instead of libpq.4.dylib. I am not sure that is the only error or need  
but that’s the error I get when I researched the problem.

---

<div class="post-metadata">

**Author:** ![hunter\_h](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/bc79bd/32.png) [@hunter\_h](https://www.ruby-forum.com/u/hunter_h)\
**Post date:** [December 31, 2006, 10:46am UTC](https://www.ruby-forum.com/t/postgresql-8-2-and-rails-ruby/80450/4 "2006-12-31T10:46:09Z")

</div>

I think it’s ruby-postgres issue. Run backend in 8.2 but stay with  
8.1.x as  
client library.

On 12/30/06, removed\_email\_address@domain.invalid [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’ve been unable to get Postgres 8.2 working. Fedora Core 4, Rails  
> 1.1.6, ruby 1.8.4, ruby-postgres gem. I get the error uninitialized  
> constant: PGConn
> 
> Don’t know if this is a Rails problem or the ruby-postgres bindings.

–  
Kevin Chen  
[http://www.realmatic.com](http://www.realmatic.com)

---

<div class="post-metadata">

**Author:** ![hunter\_h](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/bc79bd/32.png) [@hunter\_h](https://www.ruby-forum.com/u/hunter_h)\
**Post date:** [January 9, 2007, 12:50am UTC](https://www.ruby-forum.com/t/postgresql-8-2-and-rails-ruby/80450/5 "2007-01-09T00:50:03Z")

</div>

Are you using the pure ruby driver or the C based one?

The C based one just link against libpq.so. So it should work against  
8.2 as well as earlier versions. If it doesn’t, a recompile of the  
native extension should take care of it.

As for the pure-ruby one, I can’t comment on it as I don’t use it. The  
native one works perfectly for me. I even added to it proper support  
for LISTEN/NOTIFY that let you listen on notification without using  
any CPU while waiting [1].

Guy.

[1]  
[http://devblog.famundo.com/articles/2006/12/07/improving-postgres-listen-notify-support-in-ruby-rails](http://devblog.famundo.com/articles/2006/12/07/improving-postgres-listen-notify-support-in-ruby-rails)

On 12/30/06, removed\_email\_address@domain.invalid [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> I’ve been unable to get Postgres 8.2 working. Fedora Core 4, Rails  
> 1.1.6, ruby 1.8.4, ruby-postgres gem. I get the error uninitialized  
> constant: PGConn
> 
> Don’t know if this is a Rails problem or the ruby-postgres bindings.
> 
> >

–  
Family management on rails: [http://www.famundo.com](http://www.famundo.com)  
My development related blog: [http://devblog.famundo.com](http://devblog.famundo.com)
