dbi mysql support ...

J

James

hi,

i'm using 182-14 with ruby-dbi-all on windows xp professional.

I've tried to
$ruby setup.rb config --with=dbd_mysql
setup.rb:586: warning: parenthesize argument(s) for future version
setup.rb:720: warning: don't put space before argument parentheses
entering config phase...
config done.


$ruby setup.rb setup
setup.rb:586: warning: parenthesize argument(s) for future version
setup.rb:720: warning: don't put space before argument parentheses
entering setup phase...
setup.rb: skip bin/commandline(dbi) by user option
setup.rb: skip bin/proxyserver(dbd_proxy) by user option
setup.rb: skip ext/dbd_sqlite(dbd_sqlite) by user option
setup.rb: skip ext/dbd_sybase(dbd_sybase) by user option
setup done.


$ruby setup.rb install
setup.rb:586: warning: parenthesize argument(s) for future version
setup.rb:720: warning: don't put space before argument parentheses
entering install phase...
setup.rb: skip bin/commandline(dbi) by user option
setup.rb: skip bin/proxyserver(dbd_proxy) by user option
setup.rb: skip lib/dbd_ado(dbd_ado) by user option
setup.rb: skip lib/dbd_db2(dbd_db2) by user option
setup.rb: skip lib/dbd_interbase(dbd_interbase) by user option
setup.rb: skip lib/dbd_msql(dbd_msql) by user option
mkdir -p c:/ruby/lib/ruby/site_ruby/1.8/DBD/Mysql
install Mysql.rb c:/ruby/lib/ruby/site_ruby/1.8/DBD/Mysql
setup.rb: skip lib/dbd_odbc(dbd_odbc) by user option
setup.rb: skip lib/dbd_oracle(dbd_oracle) by user option
setup.rb: skip lib/dbd_pg(dbd_pg) by user option
setup.rb: skip lib/dbd_proxy(dbd_proxy) by user option
setup.rb: skip lib/dbd_sqlrelay(dbd_sqlrelay) by user option
setup.rb: skip lib/dbi(dbi) by user option
setup.rb: skip lib/wrapper(dbi) by user option
setup.rb: skip ext/dbd_sqlite(dbd_sqlite) by user option
setup.rb: skip ext/dbd_sybase(dbd_sybase) by user option
install done.


okay.. before that i've copied the mysql.so from:
http://seagecko.org/thoughts/index.php?p=28

to folder
C:\ruby\lib\ruby\site_ruby\1.8\i386-msvcrt

but when i tried to run:

require "dbi"

begin
# connect to the MySQL server
puts "ok"
dbh = DBI.connect("dbi:Mysql:test:localhost", "root", "")
puts "uh"
# get server version string and display it
row = dbh.select_one("SELECT VERSION()")
puts "Server version: " + row[0]
rescue DBI::DatabaseError => e
puts "An error occurred"
puts "Error code: #{e.err}"
puts "Error message: #{e.errstr}"
ensure
# disconnect from server
dbh.disconnect if dbh
end


this is the output:
ruby testdbi.rb

This application has requested the Runtime to terminate it in an unusual
way.
Please contact the application's support team for more information.
Exit code: 3

what's wrong?

please advice, thank you.

best regards,

James
 
K

Kaspar Schiess

(In response to by James)
please advice, thank you.

Two short advices before I am on my way..

a) Use ODBC on windows.
b) There is mysql support in pure Ruby. Don't know whether this works with
DBI.

kaspar

hand manufactured code - www.tua.ch/ruby
 

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,995
Messages
2,570,228
Members
46,818
Latest member
SapanaCarpetStudio

Latest Threads

Top