dbi mysql support ...

Discussion in 'Ruby' started by James, Jan 27, 2005.

  1. James

    James Guest

    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
     
    James, Jan 27, 2005
    #1
    1. Advertising

  2. (In response to news: 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
     
    Kaspar Schiess, Jan 27, 2005
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. ulloa
    Replies:
    1
    Views:
    527
    Juha Laiho
    Jul 22, 2004
  2. Paul Vudmaska

    dbi:mysql mysql has gone away

    Paul Vudmaska, Apr 21, 2004, in forum: Ruby
    Replies:
    0
    Views:
    115
    Paul Vudmaska
    Apr 21, 2004
  3. Jerome Hauss
    Replies:
    0
    Views:
    172
    Jerome Hauss
    Oct 13, 2004
  4. Asby

    Mason, DBI, and DBI::Pg

    Asby, Jul 24, 2003, in forum: Perl Misc
    Replies:
    0
    Views:
    177
  5. Tim Haynes
    Replies:
    3
    Views:
    143
    Ron Reidy
    Sep 13, 2003
Loading...

Share This Page