Ugly bug with one-click installer and postgres-pr

D

Daniel Berger

Windows XP Pro
dbi 0.0.23
postgres-pr 0.4.0
Ruby one-click installer, p3

I'm getting a rather ugly bug when I try to connect to a PostgreSQL
database using the one click installer. Any ideas?

# If I don't include the username

C:\ruby2\src\ruby-dbi-all>c:\ruby2\bin\irb
irb(main):001:0> VERSION
=> "1.8.4"
irb(main):002:0> require "dbi"
=> true
irb(main):003:0> DBI::VERSION
=> "0.0.23"
irb(main):004:0> dbh = DBI.connect('dbi:pg:cdlib_development')
RuntimeError: FATAL C28000 Mno PostgreSQL user name specified in
startup packet Fpostmaster.c L1537 RProcess
StartupPacket
from
c:/ruby2/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/connection.rb:55:in
`initialize'
from
c:/ruby2/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/connection.rb:29:in
`initialize'
from
c:/ruby2/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/postgres-compat.rb:23:in
`initialize'
from c:/ruby2/lib/ruby/site_ruby/1.8/DBD/Pg/Pg.rb:96:in
`initialize'
from c:/ruby2/lib/ruby/site_ruby/1.8/DBD/Pg/Pg.rb:55:in
`connect'
from c:/ruby2/lib/ruby/site_ruby/1.8/dbi/dbi.rb:584:in
`connect'
from c:/ruby2/lib/ruby/site_ruby/1.8/dbi/dbi.rb:384:in
`connect'
from (irb):4

# If I add the username

irb(main):005:0> dbh =
DBI.connect('dbi:pg:cdlib_development','postgres')
Errno::EINVAL: Invalid argument
from c:/ruby2/lib/ruby/1.8/readbytes.rb:16:in `read'
from c:/ruby2/lib/ruby/1.8/readbytes.rb:16:in `readbytes'
from
c:/ruby2/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/message.rb:32:in
`read'
from
c:/ruby2/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/connection.rb:30:in
`initialize'
from
c:/ruby2/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/connection.rb:29:in
`initialize'
from
c:/ruby2/lib/ruby/gems/1.8/gems/postgres-pr-0.4.0/lib/postgres-pr/postgres-compat.rb:23:in
`initialize'
from c:/ruby2/lib/ruby/site_ruby/1.8/DBD/Pg/Pg.rb:96:in
`initialize'
from c:/ruby2/lib/ruby/site_ruby/1.8/DBD/Pg/Pg.rb:55:in
`connect'
from c:/ruby2/lib/ruby/site_ruby/1.8/dbi/dbi.rb:584:in
`connect'
from c:/ruby2/lib/ruby/site_ruby/1.8/dbi/dbi.rb:384:in
`connect'
from (irb):5

I do NOT see this behavior with a hand built 1.8.4. Compiler issue?
How that would make a difference with a pure Ruby driver I'm not sure,
but it seems to.

Regards,

Dan
 
R

rmkeene

I tracked this down into readbytes.rb, which is a standard ruby library.
It is where a 1 (Fixnum) gets passed in. I tried putting rescu around
it an
hard coding in the 1 but that also fails.
That is very strange because IO.read should take a 1.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,930
Messages
2,570,072
Members
46,522
Latest member
Mad-Ram

Latest Threads

Top