Steps to getting Ruby to handle SQL Server on a CentOS box using unixODBC

1. yum install unixODBC freetds freetds-devel unixODBC-devel
2. Add your database to /etc/freetds.conf:
[(your custom connection name)]
host = (your host)
port = 1433
tds version = 7.0
username = (username)
password = (password)
3. Add this to /etc/odbcinst.ini:
[FreeTDS]
Description = TDS driver (Sybase/MS SQL)
Driver = /usr/lib64/libtdsodbc.so
Setup = /usr/lib64/libtdsS.so
CPTimeout =
CPReuse =
FileUsage = 1
4. Add your database to /etc/odb.ini:
[(your custom connection name)]
Driver = FreeTDS
Description = ODBC connection via FreeTDS
Trace = No
Servername = (your custom connection name)
Database = (your db name)
5. Install the following gems:
- 'dbi'
- 'ruby-odbc'
- 'dbd-odbc'
6. Connect using something like:
require 'dbi'
@connection = DBI.connect("DBI:ODBC:(your custom connection name)", (username), (password))