Updated to 1.9.1, now cannot connect to ODBC using dbi

I used to run Ruby 1.8.6. I used a simple script to pull some data from
an odbc connection:

require ‘DBI’

db = DBI.connect(‘DBI:ODBC:dsn’, ‘user’, ‘password’)

It worked fine. I got the bright idea to download and install
rubyinstaller-1.9.2-p290.exe

I did a gem install dbi.

Now the script doesn’t work. I get the error …"block in load_driver’:
Unable to load driver ‘ODBC’ (underlying error: uninitialized constant
DBI::DBD::ODBC) (DBI::InterfaceError)

I installed 1.8.6 a long time ago and I can’t remember what I did
before. Am I missing a step here? Thanks!

Have you installed the dbd-odbc gem, too?

– Matma R.

Bartosz Dziewoński wrote in post #1027668:

Have you installed the dbd-odbc gem, too?

– Matma R.

Yes. i have and i am still getting the same error as above.

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs