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

**URL:** <https://rubytalk.org/t/dbi-odbc-on-vista-could-not-load-driver/50819>\
**Category:** ruby-talk\
**Created:** [19 December 2008 22:06 UTC](https://rubytalk.org/t/dbi-odbc-on-vista-could-not-load-driver/50819 "2008-12-19T22:06:22Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Gordon\_Muirhead](https://avatars.discourse-cdn.com/v4/letter/g/67e7ee/32.png) [@Gordon\_Muirhead](https://rubytalk.org/u/Gordon_Muirhead)\
**Post date:** [19 December 2008 22:06 UTC](https://rubytalk.org/t/dbi-odbc-on-vista-could-not-load-driver/50819/1 "2008-12-19T22:06:22Z")

</div>

The following code, run from NetBeans IDE on Vista SP1 Home Edition:  
p require('dbi')  
p require('odbc')  
p DBI.available\_drivers  
dbh= DBI.connect('dbi:ODBC:cookbook','root')

Produces:  
true  
true  
["dbi:Proxy:", "dbi:ODBC:"]  
C:/users/gordon/Ruby/lib/ruby/site\_ruby/1.8/dbi.rb:368:in `load\_driver':  
Could not load driver (uninitialized constant DBI::TypeUtil)  
(DBI::InterfaceError)  
from C:/users/gordon/Ruby/lib/ruby/site\_ruby/1.8/dbi.rb:233:in  
`\_get\_full\_driver'  
from C:/users/gordon/Ruby/lib/ruby/site\_ruby/1.8/dbi.rb:219:in  
`connect'  
from  
C:/Users/Gordon/Documents/NetBeansProjects/BeansTest1/lib/main.rb:4

'cookbook' (from InstantRails, which is running)is a data source with a  
32-bit Mysql ODBC driver, v5.1, installed with the SysWOW data source  
installer.

Where do I go from here?

Thanks in advance for your kindness.

-g

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).

---

<div class="post-metadata">

**Author:** ![Roger\_Pack4](https://avatars.discourse-cdn.com/v4/letter/r/bb73d2/32.png) [@Roger\_Pack4](https://rubytalk.org/u/Roger_Pack4)\
**Post date:** [22 December 2008 08:40 UTC](https://rubytalk.org/t/dbi-odbc-on-vista-could-not-load-driver/50819/2 "2008-12-22T08:40:19Z")

</div>

I'd make sure the ruby odbc example scripts work [and maybe ditch odbc  
altogether what is that anyway?]

> **···**
>
> --  
> Posted via [http://www.ruby-forum.com/](http://www.ruby-forum.com/).
