From: Robo Date: 2004-08-28T11:45:33+09:00 Subject: Re: Can't get dbi to work? 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. 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? So, what do I need to do to make Ruby work with MySQL? I'm using WinXP, MySQL4, and Windows version of Ruby 1.8.0. I've downloaded mysql-ruby-2.4.5.tar.gz, but when I type in: ruby extconf.rb --with-mysql-dir=e:\mysql, I get: checking for mysql_query() in mysqlclient.lib... no checking for main() in m.lib... yes checking for mysql_query() in mysqlclient.lib... no checking for main() in z.lib... no checking for mysql_query() in mysqlclient.lib... no checking for main() in socket.lib... no checking for mysql_query() in mysqlclient.lib... no checking for main() in nsl.lib... no checking for mysql_query() in mysqlclient.lib... no Guess I'm still new to using databases in places other than PHP, would be appreciated if someone could guide me through the process. Thanks Robo