# Ruby-Postgres connection with libdbd-pg-ruby library

**URL:** <https://www.ruby-forum.com/t/ruby-postgres-connection-with-libdbd-pg-ruby-library/140002>\
**Category:** Ruby\
**Created:** [June 10, 2008, 12:36am UTC](https://www.ruby-forum.com/t/ruby-postgres-connection-with-libdbd-pg-ruby-library/140002 "2008-06-10T00:36:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rickcasey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/858c86/32.png) [@rickcasey](https://www.ruby-forum.com/u/rickcasey)\
**Post date:** [June 10, 2008, 12:36am UTC](https://www.ruby-forum.com/t/ruby-postgres-connection-with-libdbd-pg-ruby-library/140002/1 "2008-06-10T00:36:40Z")

</div>

I’m got Ruby on Rails 6.1 installed but am trying to hook it up to  
Postgres.

This is in a Debian Linux 2.6.18 environment, where Postgres 7.4.6 is  
our database, already running as the backend database for another  
project that I want to connect to.

My sysadmin has installed the Debian library libdbd-pg-ruby but says  
there’s no more documentation on it. Also he is reluctant to install  
the gems package described at the Ruby site as an example of how to  
connect Postgres.

Can anyone help me with configuring and testing a Ruby-Postgres  
connection, with the libdbd-pg-ruby library?

TIA,  
Rick Casey, IBG, CU Boulder

---

<div class="post-metadata">

**Author:** ![rickcasey](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/r/858c86/32.png) [@rickcasey](https://www.ruby-forum.com/u/rickcasey)\
**Post date:** [June 10, 2008, 6:56am UTC](https://www.ruby-forum.com/t/ruby-postgres-connection-with-libdbd-pg-ruby-library/140002/2 "2008-06-10T06:56:23Z")

</div>

On Monday 09 June 2008 16:50:14 rickcasey wrote:

> I’m got Ruby on Rails 6.1 installed

…are you from the future?

Ruby 1.8.7 was recently released. There is a development version called  
1.9,  
for what will eventually be Ruby 2.0.

Rails 2.1 was recently released.

> This is in a Debian Linux 2.6.18 environment

It would probably be much more helpful to say what version of Debian  
you’re  
using – for example, Debian Etch on x86, or Debian Sid on ARM, or  
whatever.

2.6.18 is the Linux Kernel version, not a debian version.

> , where Postgres 7.4.6 is  
> our database, already running as the backend database for another  
> project that I want to connect to.

While I’m on version numbers, Postgres 8.2.7 and 8.3.1 is out.

> My sysadmin has installed the Debian library libdbd-pg-ruby but says  
> there’s no more documentation on it. Also he is reluctant to install  
> the gems package described at the Ruby site as an example of how to  
> connect Postgres.

You can always install the gem locally – as in, on your workstation –  
most  
gems come with documentation. The Debian library is probably just a  
repackaging of the gem.

And you can tell your sysadmin, Rubygems is a decent package manager in  
its  
own right – if you’re going to be doing a lot of Ruby development,  
you’re  
probably going to want to use gems instead of Debian packages.
