# Problems Connecting to SQL Server

**URL:** <https://www.ruby-forum.com/t/problems-connecting-to-sql-server/68701>\
**Category:** Rails\
**Created:** [February 15, 2006, 6:10pm UTC](https://www.ruby-forum.com/t/problems-connecting-to-sql-server/68701 "2006-02-15T18:10:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![HHHHHH](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/50afbb/32.png) [@HHHHHH](https://www.ruby-forum.com/u/HHHHHH)\
**Post date:** [February 15, 2006, 6:10pm UTC](https://www.ruby-forum.com/t/problems-connecting-to-sql-server/68701/1 "2006-02-15T18:10:51Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![HHHHHH](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/50afbb/32.png) [@HHHHHH](https://www.ruby-forum.com/u/HHHHHH)\
**Post date:** [February 15, 2006, 8:00pm UTC](https://www.ruby-forum.com/t/problems-connecting-to-sql-server/68701/2 "2006-02-15T20:00:10Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![HHHHHH](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/50afbb/32.png) [@HHHHHH](https://www.ruby-forum.com/u/HHHHHH)\
**Post date:** [February 15, 2006, 8:03pm UTC](https://www.ruby-forum.com/t/problems-connecting-to-sql-server/68701/3 "2006-02-15T20:03:14Z")

</div>

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

- I forget to mark that with double \<\>
