Problem with ruby + mysql on windows , now trying dbi

B

Bruno Moura

The code(Mysql3.rb):
require 'dbi'
DBI.connect('DBI:Mysql:mydb', 'my_user', 'my user') do | dbh |
sth = dbh.prepare("SELECT * FROM table;")
sth.execute
while row = sth.fetch do
puts row
end
end

The trouble/problem

---------- Ruby Interpreter ----------
C:/InstantRails-1.6/ruby/lib/ruby/site_ruby/1.8/dbi/dbi.rb:499:in
`load_driver': is not a class/module (TypeError)
from C:/InstantRails-1.6/ruby/lib/ruby/site_ruby/1.8/dbi/dbi.rb:401:in
`_get_full_driver'
from C:/InstantRails-1.6/ruby/lib/ruby/site_ruby/1.8/dbi/dbi.rb:381:in
`connect'
from Mysql3.rb:2

Output completed (1 sec consumed) - Normal Termination
 

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

Forum statistics

Threads
473,913
Messages
2,570,027
Members
46,419
Latest member
businessfunding

Latest Threads

Top