Ruby DBI Help Needed

S

Shyamal Mitra

We have MySQL database version 4.1.7 and we recently installed
the Ruby DBI module. When I run a simple script to connect to
the database like:

#!/lusr/bin/ruby -w
require 'dbi'
dbh = DBI.connect("DBI:Mysql:database:localhost", "user", "password")


I get the following error message:

/lusr/opt/ruby-1.8.4/lib/ruby/site_ruby/1.8/dbi.rb:329:in `load_driver':
Unable to load driver 'Mysql' (DBI::InterfaceError)
from /lusr/opt/ruby-1.8.4/lib/ruby/site_ruby/1.8/dbi.rb:227:in
`_get_full_driver'
from /lusr/opt/ruby-1.8.4/lib/ruby/site_ruby/1.8/dbi.rb:213:in
`connect'
from ./dbs.rb:6


What do I need to do to get around that error. I need to write a Ruby
script that will connect to my MySQL database. Thanks for your help.

- Shyamal
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top