DBI

M

Martin Uruz

hi
i hav a problem with database access to a mysql database i use this code:
#!/usr/bin/ruby
require "dbi"

DBI.connect("DBI:Mysql:logs",
"rubychan", "Rubin") { |conn|
}
and i get the following error:

/dbi/dbi.rb:490:in `load_driver': is not a class/module (TypeError)
from /usr/lib/ruby/site_ruby/1.8/dbi/dbi.rb:392:in
`_get_full_driver'
from /usr/lib/ruby/site_ruby/1.8/dbi/dbi.rb:372:in `connect'
from ./dbtest.rb:5
can someone help me i am new in ruby
--
thx
martin pfeffer
at
suse 9.0
Apache 2.0
http://eurowalker.is.dreaming.org
 
M

Michael Neumann

hi
i hav a problem with database access to a mysql database i use this code:
#!/usr/bin/ruby
require "dbi"

DBI.connect("DBI:Mysql:logs",
"rubychan", "Rubin") { |conn|
}
and i get the following error:

/dbi/dbi.rb:490:in `load_driver': is not a class/module (TypeError)
from /usr/lib/ruby/site_ruby/1.8/dbi/dbi.rb:392:in
`_get_full_driver'
from /usr/lib/ruby/site_ruby/1.8/dbi/dbi.rb:372:in `connect'
from ./dbtest.rb:5
can someone help me i am new in ruby

Ruby/DBI depends on other software modules, in your case it expects the
mysql-ruby to be installed.

You can find it here: http://raa.ruby-lang.org/project/mysql-ruby/
Install it!

Regards,

Michael
 
M

Martin Uruz

Michael said:
Ruby/DBI depends on other software modules, in your case it expects the
mysql-ruby to be installed.

You can find it here: http://raa.ruby-lang.org/project/mysql-ruby/
Install it!

Regards,

Michael
ok but i hav problems to install it if i run the comand ruby extconf.rb
i get the following error:
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lm... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lz... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lsocket... no
checking for mysql_query() in -lmysqlclient... no
checking for main() in -lnsl... no
checking for mysql_query() in -lmysqlclient... no

must i specify all mysql directorys or what means that?


--
thx
martin pfeffer
at
suse 9.0
Apache 2.0
http://eurowalker.is.dreaming.org
 

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,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top