# PostgreSQL, Ruby, FX Ruby and Windows XP

**URL:** <https://rubytalk.org/t/postgresql-ruby-fx-ruby-and-windows-xp/8149>\
**Category:** ruby-talk\
**Created:** [19 September 2003 11:57 UTC](https://rubytalk.org/t/postgresql-ruby-fx-ruby-and-windows-xp/8149 "2003-09-19T11:57:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Szymon\_Drejewicz1](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@Szymon\_Drejewicz1](https://rubytalk.org/u/Szymon_Drejewicz1)\
**Post date:** [19 September 2003 11:57 UTC](https://rubytalk.org/t/postgresql-ruby-fx-ruby-and-windows-xp/8149/1 "2003-09-19T11:57:32Z")

</div>

Is it possible to connect to PostgreSQL database using Ruby under  
Windows XP. I need to do simple client for person who can use only  
Windows and I consider many solutions (JDBC, Ruby, ODBC in Access and so  
on).

Szymon Drejewicz

---

<div class="post-metadata">

**Author:** ![Gavin\_Sinclair](https://avatars.discourse-cdn.com/v4/letter/g/db5fbb/32.png) [@Gavin\_Sinclair](https://rubytalk.org/u/Gavin_Sinclair)\
**Post date:** [19 September 2003 12:30 UTC](https://rubytalk.org/t/postgresql-ruby-fx-ruby-and-windows-xp/8149/2 "2003-09-19T12:30:54Z")

</div>

Yes, you can download a postgres driver for Ruby from  
[raa.ruby-lang.org](http://raa.ruby-lang.org). Then you can use the DBI (database-independent)  
module (also from RAA) to do nice high-level database programming. Or  
you can use the driver directly if you wish.

I don’t see how Windows comes into the picture, but I could be wrong.

Gavin

> **···**
>
> On Friday, September 19, 2003, 9:57:32 PM, Szymon wrote:
> 
> > Is it possible to connect to PostgreSQL database using Ruby under  
> > Windows XP. I need to do simple client for person who can use only  
> > Windows and I consider many solutions (JDBC, Ruby, ODBC in Access and so  
> > on).

---

<div class="post-metadata">

**Author:** ![Szymon\_Drejewicz1](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@Szymon\_Drejewicz1](https://rubytalk.org/u/Szymon_Drejewicz1)\
**Post date:** [19 September 2003 13:17 UTC](https://rubytalk.org/t/postgresql-ruby-fx-ruby-and-windows-xp/8149/3 "2003-09-19T13:17:40Z")

</div>

Szymon Drejewicz wrote:

> Is it possible to connect to PostgreSQL database using Ruby under  
> Windows XP. I need to do simple client for person who can use only  
> Windows and I consider many solutions (JDBC, Ruby, ODBC in Access and so  
> on).
> 
> Szymon Drejewicz

I’v solved my problem by using dbi:ODBC. Ruby is the best :^)

---

<div class="post-metadata">

**Author:** ![Thomas\_Adam2](https://avatars.discourse-cdn.com/v4/letter/t/ea5d25/32.png) [@Thomas\_Adam2](https://rubytalk.org/u/Thomas_Adam2)\
**Post date:** [19 September 2003 12:33 UTC](https://rubytalk.org/t/postgresql-ruby-fx-ruby-and-windows-xp/8149/4 "2003-09-19T12:33:50Z")

</div>

— Gavin Sinclair [gsinclair@soyabean.com.au](mailto:gsinclair@soyabean.com.au) wrote: \> On Friday,  
September 19, 2003, 9:57:32 PM, Szymon wrote:

> > Is it possible to connect to PostgreSQL database using Ruby under  
> > Windows XP. I need to do simple client for person who can use only  
> > Windows and I consider many solutions (JDBC, Ruby, ODBC in Access and  
> > so  
> > on).
> 
> Yes, you can download a postgres driver for Ruby from  
> [raa.ruby-lang.org](http://raa.ruby-lang.org). Then you can use the DBI (database-independent)  
> module (also from RAA) to do nice high-level database programming. Or  
> you can use the driver directly if you wish.
> 
> I don’t see how Windows comes into the picture, but I could be wrong.

If he means connecting to a database running Postgres from within windows  
, he’ll need cygwin installed to provide a means to run it.

– Thomas Adam

> **···**
>
> > Gavin
> 
> =====  
> Thomas Adam
> 
> “The Linux Weekend Mechanic” – [www.linuxgazette.com](http://www.linuxgazette.com)
> 
> * * *
> 
> Want to chat instantly with your online friends? Get the FREE Yahoo!  
> Messenger [http://mail.messenger.yahoo.co.uk](http://mail.messenger.yahoo.co.uk)

---

<div class="post-metadata">

**Author:** ![Szymon\_Drejewicz1](https://avatars.discourse-cdn.com/v4/letter/s/f07891/32.png) [@Szymon\_Drejewicz1](https://rubytalk.org/u/Szymon_Drejewicz1)\
**Post date:** [22 September 2003 09:09 UTC](https://rubytalk.org/t/postgresql-ruby-fx-ruby-and-windows-xp/8149/5 "2003-09-22T09:09:22Z")

</div>

> If he means connecting to a database running Postgres from within windows  
> , he’ll need cygwin installed to provide a means to run it.

So I’d like to know how to compile ruby-postgres under Windows using  
Cygwin. Has anyone done it befeore? I’ve installed Ruby, Cygwin and I’ve  
downloaded ruby-postgres.tar.gz I don’t know how to compile it under  
Windows 🙂  
Is it possible to connect from Windows to PostgreSQL (working on linux)  
without usign DBI?

Szymon Drejewicz

---

<div class="post-metadata">

**Author:** ![Thomas\_Adam2](https://avatars.discourse-cdn.com/v4/letter/t/ea5d25/32.png) [@Thomas\_Adam2](https://rubytalk.org/u/Thomas_Adam2)\
**Post date:** [22 September 2003 09:14 UTC](https://rubytalk.org/t/postgresql-ruby-fx-ruby-and-windows-xp/8149/6 "2003-09-22T09:14:42Z")

</div>

— Szymon Drejewicz [drejewic@wsisiz.edu.pl](mailto:drejewic@wsisiz.edu.pl) wrote: \> \> If he means  
connecting to a database running Postgres from within

> windows
> 
> > , he’ll need cygwin installed to provide a means to run it.
> 
> So I’d like to know how to compile ruby-postgres under Windows using  
> Cygwin. Has anyone done it befeore?

No, but theoretically you could use a cross-compiler under Linux to do it,  
OR, perhaps easier using a native windows compiler (borland?) to do it –  
unfortunately I only run Linux…

> I’ve installed Ruby, Cygwin and I’ve
> 
> downloaded ruby-postgres.tar.gz I don’t know how to compile it under  
> Windows 🙂

I assume cygwin ships with GCC (or a variant thereof).

> Is it possible to connect from Windows to PostgreSQL (working on linux)  
> without usign DBI?

Use, of course it is.

– Thomas Adam

> **···**
>
> > Szymon Drejewicz
> 
> =====  
> Thomas Adam
> 
> “The Linux Weekend Mechanic” – [www.linuxgazette.com](http://www.linuxgazette.com)
> 
> * * *
> 
> Want to chat instantly with your online friends? Get the FREE Yahoo!  
> Messenger [http://mail.messenger.yahoo.co.uk](http://mail.messenger.yahoo.co.uk)
