DBI - error loading driver

Discussion in 'Ruby' started by Peter Vanderhaden, Nov 11, 2007.

  1. I installed the DBI package so that I could write Ruby scripts that
    access MySQL databases. When I attempt to run a test script, I get the
    following error:

    /usr/local/lib/site_ruby/1.8/dbi.rb:344:in `load_driver': Could not load
    driver (no such file to load -- mysql) (DBI::InterfaceError)
    from /usr/local/lib/site_ruby/1.8/dbi.rb:227:in
    `_get_full_driver'
    from /usr/local/lib/site_ruby/1.8/dbi.rb:213:in `connect'
    from /root/bin/simple.rb:6

    I used the instructions at this link:

    www.kitebird.com/articles/rubi-dbi.html

    Can anyone help me figure out what the problem is?
    Thanks....
    --
    Posted via http://www.ruby-forum.com/.
    Peter Vanderhaden, Nov 11, 2007
    #1
    1. Advertising

  2. you need to install the ruby-mysql module

    http://www.kitebird.com/articles/ruby-mysql.html

    you also need MySQL C client API header files and libraries installed

    it would be a good idea to know where your mysql libs are before
    attempting to configure


    On Nov 11, 2007, at 2:43 PM, Peter Vanderhaden wrote:

    > I installed the DBI package so that I could write Ruby scripts that
    > access MySQL databases. When I attempt to run a test script, I get
    > the
    > following error:
    >
    > /usr/local/lib/site_ruby/1.8/dbi.rb:344:in `load_driver': Could not
    > load
    > driver (no such file to load -- mysql) (DBI::InterfaceError)
    > from /usr/local/lib/site_ruby/1.8/dbi.rb:227:in
    > `_get_full_driver'
    > from /usr/local/lib/site_ruby/1.8/dbi.rb:213:in `connect'
    > from /root/bin/simple.rb:6
    >
    > I used the instructions at this link:
    >
    > www.kitebird.com/articles/rubi-dbi.html
    >
    > Can anyone help me figure out what the problem is?
    > Thanks....
    > --
    > Posted via http://www.ruby-forum.com/.
    >
    Windham, Kristopher R., Nov 11, 2007
    #2
    1. Advertising

  3. Peter Vanderhaden, Nov 11, 2007
    #3
    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:
    516
    Juha Laiho
    Jul 22, 2004
  2. Daniel Berger

    Problem loading driver with dbi, 1.8.x

    Daniel Berger, Mar 1, 2004, in forum: Ruby
    Replies:
    0
    Views:
    85
    Daniel Berger
    Mar 1, 2004
  3. snacktime

    postgres dbd driver for ruby dbi

    snacktime, Sep 23, 2005, in forum: Ruby
    Replies:
    0
    Views:
    94
    snacktime
    Sep 23, 2005
  4. Gordon Muirhead

    DBI:ODBC on Vista: "could not load driver"

    Gordon Muirhead, Dec 19, 2008, in forum: Ruby
    Replies:
    1
    Views:
    131
    Roger Pack
    Dec 22, 2008
  5. gavino

    perl dbi driver for microsoft sql?

    gavino, Aug 15, 2006, in forum: Perl Misc
    Replies:
    12
    Views:
    269
    John Bokma
    Aug 21, 2006
Loading...

Share This Page