ruby connect

Started by Justin Carreraover 16 years ago9 messages
#1Justin Carrera
j-carrera@northwestern.edu

I'm trying to connect ruby to postgres on ubuntu and the only link I found that has the library is down. Does anyone have the postgres library for ruby? Or direct me to it?

Justin Darby Carrera
Database Programmer/Analyst
MED-Department of Medical Social Sciences
j-carrera@northwestern.edu<mailto:j-carrera@northwestern.edu>
312-695-8994

#2Nikhil Sontakke
nikhil.sontakke@enterprisedb.com
In reply to: Justin Carrera (#1)
Re: ruby connect

Hi,

I’m trying to connect ruby to postgres on ubuntu and the only link I found
that has the library is down. Does anyone have the postgres library for
ruby? Or direct me to it?

You would be better off searching for the drivers on rubyforge.org. Please
do not send non-Postgres-development related queries on this list.

Regards,
Nikhils
--
http://www.enterprisedb.com

#3Justin Carrera
j-carrera@northwestern.edu
In reply to: Nikhil Sontakke (#2)

Hi,

I'm trying to connect ruby to postgres on ubuntu and the only link I found that has the library is down. Does anyone have the postgres library for ruby? Or direct me to it?

#4Justin Carrera
j-carrera@northwestern.edu
In reply to: Justin Carrera (#1)

Hi,

I'm trying to connect ruby to postgres on ubuntu and the only link I found that has the library is down. Does anyone have the postgres library for ruby? Or direct me to it?

#5Devrim GÜNDÜZ
devrim@gunduz.org
In reply to: Justin Carrera (#4)
Re: ruby connect

On Mon, 2009-06-01 at 09:29 -0400, Justin Carrera wrote:

Does anyone have the postgres library for ruby?

http://rubyforge.org/projects/ruby-pg

Regards,
--
Devrim GÜNDÜZ, RHCE
Command Prompt - http://www.CommandPrompt.com
devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
http://www.gunduz.org

#6Richard Huxton
dev@archonet.com
In reply to: Justin Carrera (#3)
Re: ruby connect

Justin Carrera wrote:

Hi,

I'm trying to connect ruby to postgres on ubuntu and the only link I
found that has the library is down.

Details of the link might have helped the other readers on this list.
The owner might not know.

Does anyone have the postgres
library for ruby? Or direct me to it?

I think this is the current project:
http://rubyforge.org/projects/ruby-pg/

It would help if it came up prominently on searches for "postgresql" though.

--
Richard Huxton
Archonet Ltd

#7Richard Huxton
dev@archonet.com
In reply to: Justin Carrera (#1)
Re: ruby connect

Justin Carrera wrote:

I will remember that for next time.

Thank you for the link.

I tried installing the gem but unsuccessful...

root@CodeHo:/home/justin/Documents/ruby# gem install postgres -- --with-pgsql-include=/opt/PostgreSQL/8.3/include --with-pgsql-lib=/opt/PostgreSQL/8.3/lib
Building native extensions. This could take a while...
ERROR: Error installing postgres:
ERROR: Failed to build gem native extension.

/usr/bin/ruby1.9 extconf.rb install postgres -- --with-pgsql-include=/opt/PostgreSQL/8.3/include --with-pgsql-lib=/opt/PostgreSQL/8.3/lib
extconf.rb:4:in `<main>': uninitialized constant PLATFORM (NameError)

I'm afraid I don't use ruby, so I can't provide specific advice.
However, this looks to me like the gem installer expects a PLATFORM
(e.g. "linux") to be defined and can't find it. I'd expect there is a
guide to setting up your gems environment somewhere on the ruby pages
though.

However, before you spend too long with this - are you sure there isn't
an Ubuntu package for this? A few seconds' searching suggests this might
be what you're after:
http://packages.ubuntu.com/search?keywords=libpgsql-ruby

--
Richard Huxton
Archonet Ltd

#8Scott Bailey
artacus@comcast.net
In reply to: Justin Carrera (#3)
Re: ruby connect

I�m trying to connect ruby to postgres on ubuntu and the only link I
found that has the library is down. Does anyone have the postgres
library for ruby? Or direct me to it?

Yeah, I think this is an area that we need to address if we want to see
wider adoption of Postgres. I started out to write a postgres utility in
Ruby. I think I eventually got it to work. But by that time I was
convinced that noone would actually go thru that much hassle in order to
try out the app. So I wrote it in Python instead. But if I was a Ruby
developer setting out to write a database application, I'm sure I would
have given up on Postgres and used MySQL instead.

Scott

#9Marcin Stępnicki
mstepnicki@gmail.com
In reply to: Justin Carrera (#1)
Re: ruby connect

Dnia Mon, 01 Jun 2009 09:29:30 -0400, Justin Carrera napisał(a):

Hi,

I'm trying to connect ruby to postgres on ubuntu and the only link I
found that has the library is down. Does anyone have the postgres
library for ruby? Or direct me to it?

It's in the libpgsql-ruby package.