Bugs: Browse | Submit New | Admin

[#27616] Unable to load ODBC driver for Ruby 1.9.1

Date:
2009-12-24 13:50
Priority:
3
Submitted By:
Geert Fannes (gfannes)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
Unable to load ODBC driver for Ruby 1.9.1

Detailed description
Hello,

I've installed Ruby 1.9.1 p243 from rubyinstaller.org and installed both dbi and dbd-odbc via gems. Installation works
fine...

But, when I try to connect to a database via ODBC, I get this error:

c:/.../gems/1.9.1/gems/dbi-0.4.3/lib/dbi.rb:300:in `block in load_driver': Unable to load driver 'ODBC' (underlying
error: uninitialized const
ant DBI::DBD::ODBC) (DBI::InterfaceError)

I searched a lot, but could not find any failsafe procedure to get ruby 1.9.1 running with dbi/dbd-odb. Any suggestion
or hint?

Greetings,
Geert.

Add A Comment: Notepad

Please login


Followup

Message
Date: 2010-03-04 20:41
Sender: Erik Hollensbe

Please ensure you have ruby-odbc and unixodbc working before
attempting to load the ODBC module.

And yes, drivers in DBI are case-sensitive.
Date: 2010-03-04 20:39
Sender: Shane Emmons

I had this problem when my connection string was like this:
  'dbi:odbc:dsn'

Then I changed it to the following on a whim and it worked:
  'dbi:ODBC:dsn'

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item