Ruby and PostgreSQL?

Hi-

Not sure if this is the right place to post this, however I am looking
for documentation for using Ruby with a Postgres database. I found
the ruby-pg gem, however nothing in the way of docs and Google isn't
giving me much.

Anyone have any experience with this?

Thanks!

You will want the "pg" gem as opposed to the ruby-pg gem for a start. You did not specify your platform, but you will need a compiler to install the gem. There is a pure ruby connector for postgres: postgres-pr which provides the same functionality though with slower performance.

You can start here for documentation on the functionality available.

Cheers--

Charles

···

On Sep 28, 2009, at 10:25 AM, pete wrote:

Hi-

Not sure if this is the right place to post this, however I am looking
for documentation for using Ruby with a Postgres database. I found
the ruby-pg gem, however nothing in the way of docs and Google isn't
giving me much.

Anyone have any experience with this?

Thanks!

--
Charles Johnson
Advanced Computing Center for Research and Education
Vanderbilt University

ruby-pg has pretty good rdoc, which you can view locally with `gem server`.

Ben

···

On Mon, Sep 28, 2009 at 8:25 AM, pete <peterbattaglia@gmail.com> wrote:

Not sure if this is the right place to post this, however I am looking
for documentation for using Ruby with a Postgres database. I found
the ruby-pg gem, however nothing in the way of docs and Google isn't
giving me much.

Hi! There should be documentation; try running rdoc in the source tree,
according to google. I did "rdoc --op foo", and foo/index.html yielded
a moderately usable hunk of documentation.

I was using this for a while (enough to find and submit a fix for a very
ugly memory corruption bug), but now I don't directly use it, rather, I
have it embedded in Rails and use it through ActiveRecord.

-s

···

On 2009-09-28, pete <peterbattaglia@gmail.com> wrote:

Not sure if this is the right place to post this, however I am looking
for documentation for using Ruby with a Postgres database. I found
the ruby-pg gem, however nothing in the way of docs and Google isn't
giving me much.

--
Copyright 2009, all wrongs reversed. Peter Seebach / usenet-nospam@seebs.net
| Seebs.Net <-- lawsuits, religion, and funny pictures
Fair game (Scientology) - Wikipedia <-- get educated!

And of course you can write stored procedures with PL/Ruby - no need for
that old fashioned business logic layer - stick everything in the
database!

···

--
Posted via http://www.ruby-forum.com/.

I didn't even know that existed, awesome, thanks!

···

On Sep 28, 9:46 am, Ben Bleything <b...@bleything.net> wrote:

On Mon, Sep 28, 2009 at 8:25 AM, pete <peterbattag...@gmail.com> wrote:
> Not sure if this is the right place to post this, however I am looking
> for documentation for using Ruby with a Postgres database. I found
> the ruby-pg gem, however nothing in the way of docs and Google isn't
> giving me much.

ruby-pg has pretty good rdoc, which you can view locally with `gem server`.

Ben

I posted a little roundup of Ruby PostgreSQL drivers recently:

To summarize, "gem install pg", and things are much better than they were a few years ago :slight_smile:

Yours,

Tom

···

On Sep 28, 2009, at 11:39 AM, Charles Johnson wrote:

You will want the "pg" gem as opposed to the ruby-pg gem for a start. You did not specify your platform, but you will need a compiler to install the gem. There is a pure ruby connector for postgres: postgres-pr which provides the same functionality though with slower performance.