PHWinfo banniere

Titres
PORTAIL ANNUAIRE ARTICLES COMPARATEUR HÉBERGEURS DEVIS FORUMS RÉDUCTEUR D'URL
Précédent   PHWinfo > Autres forums > Forum Programmation & Conception > comp.lang.ruby > Getting Ruby to work with Postgres on Windows XP
S'inscrire FAQ Membres Recherche Messages du jour Marquer les forums comme lus
Getting Ruby to work with Postgres on Windows XP

Réponse
 
LinkBack Outils de la discussion
Vieux 22/11/2007, 15h15   #1
Dillip Kumar
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Getting Ruby to work with Postgres on Windows XP

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 would be greatly appreciated.

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

  Réponse avec citation
Vieux 22/11/2007, 16h20   #2
Dillip Kumar
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Getting Ruby to work with Postgres on Windows XP

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 would be greatly appreciated.
>
> D


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

  Réponse avec citation
Vieux 22/11/2007, 18h03   #3
M. Edward (Ed) Borasky
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Getting Ruby to work with Postgres on Windows XP

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 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 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.


  Réponse avec citation
Vieux 22/11/2007, 20h38   #4
Damjan Rems
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Getting Ruby to work with Postgres on Windows XP


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-forum.com/.

  Réponse avec citation
Vieux 23/11/2007, 08h54   #5
Dillip Kumar
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Getting Ruby to work with Postgres on Windows XP

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-forum.com/.

  Réponse avec citation
Vieux 24/11/2007, 01h14   #6
Kevin Williams
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: Getting Ruby to work with Postgres on Windows XP

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-forum.com/.

  Réponse avec citation
Réponse


Outils de la discussion

Règles de messages
Vous ne pouvez pas créer de nouvelles discussions
Vous ne pouvez pas envoyer des réponses
Vous ne pouvez pas envoyer des pièces jointes
Vous ne pouvez pas modifier vos messages

Les balises BB sont activées : oui
Les smileys sont activés : oui
La balise [IMG] est activée : oui
Le code HTML peut être employé : non
Trackbacks are oui
Pingbacks are oui
Refbacks are oui


Fuseau horaire GMT +1. Il est actuellement 17h12.


Édité par : vBulletin® version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0 RC5 Tous droits réservés.
Version française #16 par l'association vBulletin francophone
PHWinfo est un site Éducation Sans Frontières ©2000-2008
Ad Management by RedTyger
©Tous droits réservés par les parties respectives
Page generated in 0,15706 seconds with 14 queries