From: Michael Neumann Date: 2004-08-28T22:12:54+09:00 Subject: Re: Can't get dbi to work? Robo wrote: > Michael Neumann wrote: > >>> require 'dbi' >>> >>> dbh = DBI.connect('DBI:Mysql:xxxxx', 'xxxxx', 'xxxxx') >>> >>> And got this error: >>> >>> ../dbi/dbi.rb:499:in `load_driver': is not a class/module (TypeError) >>> from ./dbi/dbi.rb:401:in `_get_full_driver' >>> from ./dbi/dbi.rb:381:in `connect' >>> from import.rb:3 >>> >>> Can someone please explain this to me, why it isn't work, and how I >>> can fix it? I can't get any further till I can at least connect to >>> the MySQL db I created. >> >> >> >> It can't find the driver due to a wrong location. >> >> Hope this helps. >> >> Regards, >> >> Michael >> > > I got it installed correctly now, but still getting the "load_driver" > error. Then it can't load the required ruby-mysql (or mysql-ruby) library. > I think I've missed s step somewhere. Up until now I've been using MySQL > with PHP, and with PHP I just have to install MySQL and then everything > works. I'm guessing I'll need to install the driver or API first to make > this work? Exactly. You need to either install ruby-mysql or mysql-ruby (see RAA, Ruby's Application Archive: raa.ruby-lang.org). Regards, Michael