Problems Connecting to SQL Server


#1

I’ve been asked to make my app work on Windows Server 2003 and connect
to
SQL Server. I’m having trouble getting connected to SQL Server. It fails
as
follows:

is not a class/module

C:\InstantRails-1.0\ruby\lib\ruby\site_ruby\1.8\dbi\dbi.rb:499 in
‘load_driver’

So, I went through the instructions on the Rails/MSSQL page. I installed
the
ADO.rb stuff.

Also, require “dbi” comes back true.

Still no dice.

I did some Googling and while the term comes up, I couldn’t find a
solution.

Any other ideas for troubleshooting this stuff?

Thanks.
H


#2

HH (and other interested readers)

I’ve attached a file I use to test connections to the SQL Server
databases I
need to access. It’s a plain ruby file so running it should give you a
helpful error message if a connection can’t be made.

It sounds like you’ve done the necessary legwork to get the connection
going; I followed the same page you did.

HTH

Mel


#3

DOH! - the second connection string takes an ODBC datasource name you
define

  • I forget to mark that with double <>