The idea is that you use these notes as a reference and look at the full guide for details.
Read the notes at the end of the wiki page first as the locations of various config files and .so files depends on your distro. That way, you have these potential stumbling blocks in mind when following the full guide. Also note that the wiki is fairly unstructured with numerous edits and comments. Don't expect Wikipedia standards.
I would recommend building unixODBC and freeTDS from source as opposed to apt-get or yum
- Export env vars for ODBCINI, ODBCSYSINI and FREETDSCONF. You may have to create symlinks to the odbc.ini and odbcinst.ini files later from the user ~/ dir. See unixODBC configuration. For FreeTDS, symlink to freetds.conf from /usr/local/etc unless it already in that dir. See FreeTDS configuration.
- Install unixODBC-devel, unixODBC verify where libtdsodbc.so ends up
- if you can't fint libtdsodbc.so after, then compilation has failed
- remember where you configured the location of --sysconfdir
- require "dbi"
- dbh = DBI.connect('dbi:ODBC:YOUR_DB_DEFINITION_NAME', 'USERNAME', 'PASSWORD')