ports/database/ruby-dbi and ports/database/ruby-dbd_pg faulty.

O. Hartmann ohartman at zedat.fu-berlin.de
Thu Dec 6 13:08:55 PST 2007


I try to use DBI:Pg and DBI:MySQL within a ruby-skript for accessing 
either MySQL or PostgreSQL database.

Box is FreeBSD 7.0-BETA4
Mysql is mysql50-server
Postgresql is posgresql82-server and postgresql82-client
with unixODBC and ruby-dbi and ruby-dbd_pg and ruby-dbd_mysql installed.

When running an access using Pg as backend (Postgres) and run this

dsn   = "DBI:Pg:dbname=#{@db};host=#{@db_host};port=#{@db_port}"

dbh     = DBI.connect(dsn, at db_user, at db_passwd)

I get this error:

/usr/local/lib/ruby/site_ruby/1.8/dbi.rb:344:in `load_driver': Could not 
load driver (no such file to load -- postgres) (DBI::InterfaceError)
         from /usr/local/lib/ruby/site_ruby/1.8/dbi.rb:227:in 
         from /usr/local/lib/ruby/site_ruby/1.8/dbi.rb:213:in `connect'

It seems that a class library 'postgres.rb' is missing, which is 
included by Pg.rb located in /usr/local/lib/ruby/site_ruby/1.8/DBD/Pg/.

I did a find on my whole filesystem looking for 'postgres.rb' or 
'postgres*' and did not find suitable. It seems this file is missing and 
not been installed by the installation process via ports.

Is this a 'feature', or should I fill out a PR?


More information about the freebsd-questions mailing list