Problem with Ruby ODBC in Linux

S

Sam Kong

Hi,

I am trying to connect to a SQL Server 7.0 DB from a Linux box using
Ruby DBI & ODBC.

1. ruby -v
ruby 1.8.6 (2007-03-13 patchlevel 0) [i686-linux]

2. ruby-odbc installed ok.
ruby-odbc-0.9995> ruby test.rb dsn_name username password
all tests ok!

3. DBI is properly installed.
irb> require 'dbi'
=> true

BUT, the following fails in the same irb session.

irb> DBI.connect('dbi:ODBC:dsn_name', 'username', password')
DBI::InterfaceError: Unable to load driver 'ODBC'
...

What is missing?
Or how can I track it down?

Mysql works fine.
I believe I set up the ODBC configuration correctly.
I can access the SQL Server via isql command.

Thanks.

Sam
 
S

Sam Kong

I fixed the problem.

I reinstalled Ruby DBI.

ruby setup.rb config --with=dbi,dbd_odbc
ruby setup.rb setup
ruby setup.rb install

I think the --with=dbi,dbd_odbc made the difference.


Sam
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

ruby odbc 2
ruby odbc 0
ODBC query 0
problems with Ruby ODBC connection to MSSQL 2008 0
Windows, ODBC and charsets 4
mysql -- cannot connect (can in Perl) 6
dbi help required 0
ODBC, MS SQL Server 8

Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,058
Latest member
QQXCharlot

Latest Threads

Top