Rails - MS-SQL Server problems (unixODBC, FreeTDS) on Mac 10.6
- by TMB
Followed the instructions on the Rails wiki and have had success connecting to SQL Server 2000 with TSQL -- both with DSN-less and DNS connections. I'm running Mac OS X 10.6.3.
Wiki instructions here.
Installed ruby-odbc, dbi (0.4.0), dbd-odbc (2.4.5), activerecord-sqlserver-adapter (2.3.5).
In my database.yml (Rails 2.3.6):
development:
adapter: sqlserver
mode: ODBC
dsn: 'DRIVER=/usr/local/lib/libtdsodbc.so;TDS_Version=8.0;SERVER=mssql01.discountasp.net;DATABASE=DB_164368_dmusd;Port=1433;uid=DB_164368_dmusd_user;pwd=Schools77;'
This yields the following error: ODBC::Error: S1090 (0) [unixODBC][Driver Manager]Invalid string or buffer length
When I attempt to use a DSN connection, I get the following error: ODBC::Error: IM002 (0) [unixODBC][Driver Manager]Data source name not found, and no default driver specified
I have in fact verified that the FreeTDS driver (libtdsodbc.so) is installed and the path correct.
Can anyone spot the error of my ways? Thanks in advance.