[lnkForumImage]
TotalShareware - Download Free Software

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


 

Forums >

comp.lang.ruby

Getting Ruby to work with Postgres on Windows XP

Dillip Kumar

11/22/2007 3:16:00 PM

Hi there,

I have postgres 8.2 installed (not from the source, just the installer)
and would like to get ruby to talk to my postgres databases simply. I
have ruby-postgres installed and am using the extconf.rb to install it,
but it is having problems finding the correct libraries and headers.

do I need to install postgres from source? or where am I supposed to
point it to?

Any help would be greatly appreciated.

D
--
Posted via http://www.ruby-....

5 Answers

Dillip Kumar

11/22/2007 4:21:00 PM

0

I know that I should be using windows. But got no choice. :-(

Dillip Kumar wrote:
> Hi there,
>
> I have postgres 8.2 installed (not from the source, just the installer)
> and would like to get ruby to talk to my postgres databases simply. I
> have ruby-postgres installed and am using the extconf.rb to install it,
> but it is having problems finding the correct libraries and headers.
>
> do I need to install postgres from source? or where am I supposed to
> point it to?
>
> Any help would be greatly appreciated.
>
> D

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

M. Edward (Ed) Borasky

11/22/2007 6:03:00 PM

0

Dillip Kumar wrote:
> Hi there,
>
> I have postgres 8.2 installed (not from the source, just the installer)
> and would like to get ruby to talk to my postgres databases simply. I
> have ruby-postgres installed and am using the extconf.rb to install it,
> but it is having problems finding the correct libraries and headers.
>
> do I need to install postgres from source? or where am I supposed to
> point it to?
>
> Any help would be greatly appreciated.
>
> D

If you've got Ruby from the one-click installer, you should be able to
install the gems for the PostgreSQL interface. If you're behind a
firewall, you might need to have IT help you, but essentially, all you
need to do is open up the RubyGems command line gem installer that comes
with the one-click installer and install the gem(s).

There are two Ruby/PostgreSQL interface gems, one with some C language
code and one that is pure Ruby. Your problem indicates that you tried
the one with C code. I don't have a Windows system with one-click handy,
but my recollection is that the gem for the C-language version is
pre-compiled for Windows.

I have never used either version, so I can't comment on whether the pure
Ruby or the C-language version is "better" by any definition of the
word. But one way or another, if you use the one-click installer, you
should be able to get up and running via RubyGems without PostgreSQL source.


Damjan Rems

11/22/2007 8:38:00 PM

0


I use postgres-pr gem and it works fine with rails. As I remember
optimized driver does not work on Windows.

When I want to connect without ActiveRecord (Rails) I use ruby DBI gem.

Both can be found on RubyForge.


by
TheR



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

Dillip Kumar

11/23/2007 8:55:00 AM

0

Thank you both. Works great with postgres-pr.

I can't wait till I get off this Windows box :-)

Dillip

Damjan Rems wrote:
>
> I use postgres-pr gem and it works fine with rails. As I remember
> optimized driver does not work on Windows.
>
> When I want to connect without ActiveRecord (Rails) I use ruby DBI gem.
>
> Both can be found on RubyForge.
>
>
> by
> TheR

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

Kevin Williams

11/24/2007 1:14:00 AM

0

I use the "ruby-postgres-0.7.1.2006.04.06-mswin32" gem all the time, no
compiler required. I've never tried postgres-pr, but I would assume the
C extension would be a bit more performant. Why not install the binary
gem instead of trying to install from source?

Dillip Kumar wrote:
> Thank you both. Works great with postgres-pr.
>
> I can't wait till I get off this Windows box :-)
>
> Dillip
>
> Damjan Rems wrote:
>>
>> I use postgres-pr gem and it works fine with rails. As I remember
>> optimized driver does not work on Windows.
>>
>> When I want to connect without ActiveRecord (Rails) I use ruby DBI gem.
>>
>> Both can be found on RubyForge.
>>
>>
>> by
>> TheR

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