Connect rails application to MsSQL 2005 from Windows
- by Enrico Carlesso
Hi guys.
I (sadly) have to deploy a rails application on Windows XP which has to connect to Microsoft SQL Server 2005.
Surfing in the web there are a lot of hits for connect from Linux to MsSQL, but cannot find out how to do it from Windows.
Basically I followed these steps:
Install dbi gem
Install activerecord-sql-server-adapter gem
My database.yml now looks like this:
development:
adapter: sqlserver
mode: odbc
dsn: test_dj
host: HOSTNAME\SQLEXPRESS
database: test_dj
username: guest
password: guest
But I'm unable to connect it. When I run rake db:migrate I get
IM002 (0) [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified
I'm not a Windows user, so cannot understand really well the meaning of dsn element or so.
Does someone have an idea how to solve this?
Thanks in advance