From: Ernest Ellingson Date: 2005-01-07T03:46:29+09:00 Subject: Re: postgres-pr Michael Neumann wrote: > Ernest Ellingson wrote: > >> I've installed the windows version of ruby-1.8.2 with the latest >> one-click installer. I used gem to install postgres-pr-0.3.2. >> However, I can't seem to get any of the examples to run. I'm >> getting a >> >> uninitialized constant StartupMessage (NameError) in client.rb > > > > I fixed that. put a "include PostgresPR" after the requires and it > works. Try postgres-pr-0.3.3. > >> The require statements are: >> $LOAD_PATH.unshift "../lib" >> requie 'rubygems' >> require 'postgres-pr/message' >> require 'socket' >> >> The first two lines of code are >> >> s = UNIXSocket.new(ARGV.shift || "/tmp/.s.PGSQL.5432") >> >> msg = StartupMessage.new(196608, "user" => "mneumann", "database" => >> "mneumann") >> >> I can't use a UNIXSocket because I'm not running Cygwin. However, I >> don't see any requirements in postgres-pr/message.rb for (s). >> Am I missing something? > > > I don't understand your question... Maybe... The UNIXSocket is only used > in the example, you can use postgres-pr/connection.rb without a > UNIXSocket, with a TCPSocket. That's no problem. > >> Does someone have any experience using postgres-pr in the dbi. If so, >> How does one connect to a server? > > > Just use DBD::Pg. I've not tried it. But I know that it works with > ActiveRecord and Og. > > Regards, > > Michael > > > Thanks Michael, I'll give it a whirl and let you know how things worked out. Ernie