From: "Mark A. Malloy" Date: 2001-12-18T00:37:23+09:00 Subject: [ruby-talk:28786] DBI/DBD installation problems I come from a Perl background and want to try Ruby to see if it's something worth getting into. I have 1.6.5 compiled from source and working fine in a Solaris 8/Sparc box, but I am having trouble getting my Ruby installation to happily work with MySQL. It was my understanding that I could use just the ruby DBI to install both the DBI and DBD necessary for MySQL, so here's how I gave it a go: root@ttark: ruby setup.rb config --with=dbi,dbd_mysql entering config phase... config done. root@ttark: ruby setup.rb setup entering setup phase... setup.rb: skip ext/dbd_sqlite(dbd_sqlite) by user option setup.rb: skip ext/dbd_sybase(dbd_sybase) by user option setup done. root@ttark: ruby setup.rb install entering install phase... mkdir -p /usr/local/lib/ruby/site_ruby/1.6/dbi install columninfo.rb /usr/local/lib/ruby/site_ruby/1.6/dbi install dbi.rb /usr/local/lib/ruby/site_ruby/1.6/dbi install row.rb /usr/local/lib/ruby/site_ruby/1.6/dbi install sql.rb /usr/local/lib/ruby/site_ruby/1.6/dbi install trace.rb /usr/local/lib/ruby/site_ruby/1.6/dbi install utils.rb /usr/local/lib/ruby/site_ruby/1.6/dbi setup.rb: skip lib/dbd_ado(dbd_ado) by user option setup.rb: skip lib/dbd_db2(dbd_db2) by user option setup.rb: skip lib/dbd_interbase(dbd_interbase) by user option setup.rb: skip lib/dbd_msql(dbd_msql) by user option mkdir -p /usr/local/lib/ruby/site_ruby/1.6/DBD/Mysql install Mysql.rb /usr/local/lib/ruby/site_ruby/1.6/DBD/Mysql setup.rb: skip lib/dbd_odbc(dbd_odbc) by user option setup.rb: skip lib/dbd_oracle(dbd_oracle) by user option setup.rb: skip lib/dbd_pg(dbd_pg) by user option setup.rb: skip lib/dbd_proxy(dbd_proxy) by user option setup.rb: skip lib/dbd_sqlrelay(dbd_sqlrelay) by user option mkdir -p /usr/local/lib/ruby/site_ruby/1.6/. install dbi.rb /usr/local/lib/ruby/site_ruby/1.6/. setup.rb: skip ext/dbd_sqlite(dbd_sqlite) by user option setup.rb: skip ext/dbd_sybase(dbd_sybase) by user option install done. root@ttark: I then tried running the following program to test the connectivity: #!/usr/bin/ruby require 'dbi' dbh = DBI.connect('DBI:Mysql:Test', 'test', 'test') And I get this error: /usr/local/lib/ruby/site_ruby/1.6/dbi/dbi.rb:403:in `load_driver': Could not load driver (uninitialized constant Mysql at DBI::DBD) (DBI::InterfaceError) from /usr/local/lib/ruby/site_ruby/1.6/dbi/dbi.rb:318:in `_get_full_driver' from /usr/local/lib/ruby/site_ruby/1.6/dbi/dbi.rb:298:in `connect' from ../db.rb:4 I checked the DBD and dbi directories and all of the files there seem to have been installed and are all readable by all users. The only problem that I can see (but don't know enough about Ruby to know if it's really a problem) is the reference to require "mysql" at the top of the Mysql.rb file, since there are no other files in that directory (/usr/local/lib/ruby/site_ruby/1.6/DBD/Mysql/). I'm sure it's something stupid that I'm missing, but any help would be appreciated. Thanks, - Mark