[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Ruby-Postgres connection with libdbd-pg-ruby library

rickcasey

6/9/2008 9:47:00 PM

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
1 Answer

David Masover

6/10/2008 4:00:00 AM

0

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.