Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > dbi mysql support ...

Reply
Thread Tools

dbi mysql support ...

 
 
James
Guest
Posts: n/a
 
      01-27-2005
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:atabaseError => 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
 
Reply With Quote
 
 
 
 
Kaspar Schiess
Guest
Posts: n/a
 
      01-27-2005
(In response to news:(E-Mail Removed) 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



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DBI Mysql storing DBI:binary, trouble with character 26 Jerome Hauss Ruby 0 10-13-2004 03:04 PM
DBI and DBI::Oracle packages configuration ulloa Perl 1 07-22-2004 05:52 PM
dbi:mysql mysql has gone away Paul Vudmaska Ruby 0 04-21-2004 06:19 PM
DBI problem : How can I load quickly one huge table with DBI ??. Tim Haynes Perl Misc 3 09-13-2003 03:43 AM
Mason, DBI, and DBI::Pg Asby Perl Misc 0 07-24-2003 09:04 PM



Advertisments