From: Dave Howell Date: 2006-02-01T06:05:47+09:00 Subject: Re: postgres database On Jan 26, 2006, at 18:05, Pat Maddox wrote: > On 1/26/06, tsumeruby@tsumelabs.com wrote: >> >> The issue is not about wether one library works better than the >> other. As long >> as the library is functional is the most important. However, the >> original OP >> was wanting to know a method for not having to compile postgres client >> library on each platform. Of course the solution is a pure ruby >> implementation. >> >> Tsume >> >> > > It's not an issue? A native adapter is going to be faster than the > pure ruby adapter. Not sure how you came up with "the OP was wanting > to know a method for not having to compile postres client library on > each platform." > > Here's the original question: > > "What is the file I need to require for connection to a postgres > database? DNS resolution? But he wasn't responding to the original question, but rather, to MY comment that there was a missing caveat for the non-pure-Ruby version; that you had to have the libraries installed somewhere, which means either that you have to have a local installation of Postgres (whether the database is local or not), or you have to somehow manually relocate said libraries, and tell the installer where you put them. You do NOT have to *compile* Postgres; you just need the libraries. Or you need an implementation that doesn't use them. I didn't install the pure Ruby version because (a) I'd tried it once before and had the install fail, and (b) I didn't _know_ that I'd have to fiddle around with copying the postgres library files over to my laptop until I tried installing the native-code Ruby/Postgres gem. I have now done so, so I'm probably not going to try installing a different gem unless I have to. Ruby programs under OSX are already horribly non-portable (it's amazing what doesn't fly under default Ruby 1.6.8/OSX 10.3 vis a vis Ruby 1.8.?, never mind the various whateverses I've installed, like the Postgres gem), so I'll just have to see how well standaloneify.rb works for giving me binary-complete Ruby apps.