From: Michael Neumann Date: 2004-08-28T04:23:06+09:00 Subject: Re: Can't get dbi to work? Robo wrote: > I'm using WindowsXP, I've downloaded ruby-dbi-all-0.0.23.tar.gz, and > typed the following commands: > > ruby setup.rb config --with=dbi,dbd_mysql, dbd_odbc > ruby setup.rb setup > ruby setup.rb install > > During the install phrase, I get the following error: > > entering install phase... > mkdir -p e:/ruby/bin > install sqlsh.rb e:/ruby/bin > install failed > Permission denied - e:/ruby/bin/sqlsh.rb > try "ruby setup.rb --help" for usage > > Since that didn't work, I deleted the dbi directories from e:\ruby\bin, > and copied the "dbi" and "dbd_mysql" dir to the folder I'm currently > creating my project in. In that folder I ran this file: You have to put the file from directory dbd_mysql into a directory named DBD/Mysql, i.e. there must be a file DBD/Mysql/Mysql.rb somewhere. > 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