Kurt Stephens

Nerd Up!

Recent comments

Random image

Latest image

Syndicate

Syndicate content

Browse archives

« November 2008  
Mo Tu We Th Fr Sa Su
          1 2
3 4 5 6 7 8 9
10 11 12 13 14 15
17 18 19 20 21 22
24 25 26 27 28 29 30
Kurt on Thu, 2008-05-22 13:56.

I did this little hackage during a boring PGcon 2008 talk…

This patch allows the postgres gem 0.7.9.2008.01.28 to be compiled under Ruby 1.9 against PostgreSQL 8.3.0 client libraries.

It appears to work against a PostgreSQL 8.1 server, but I have not run any detailed testing, yet.

--- ext/extconf.rb.orig	2008-05-22 09:47:06.000000000 -0500
+++ ext/extconf.rb	2008-05-22 09:52:28.000000000 -0500
@@ -1,6 +1,9 @@

+# Ruby 1.9
+PLATFORM = RUBY_PLATFORM unless defined? PLATFORM
+

 # windows compatibility, need different library name
 if(PLATFORM =~ /mingw|mswin/) then
   $libname = '/ms/libpq'
 else

Enjoy!

links: read more | Kurt's blog | add new comment | 433 reads

Reply

The content of this field is kept private and will not be shown publicly.
Captcha Image: you will need to recognize the text in it.
Please type in the letters/numbers that are shown in the image above.