I had zero exposure to sqlserver before today. With the help of a dba and google :) I finally achieved the communication. Here's what I did to achieve this -
Make an odbc connection - pointing to the db server, preferably make a sql server authentication user
Install the following gems
Further, I copied odbc.so and odbc_utf8.so files from http://www.ch-werner.de/ rubyodbc/i386-msvcrt-ruby- odbc.zip to .../ruby/1.8/i386-msvcrt even though exact directory was not found in the path. So, the files were eventually copied to ...\Ruby187\lib\ruby\1.8\i386- mingw32
My database.yml file looks like this -
Make an odbc connection - pointing to the db server, preferably make a sql server authentication user
Install the following gems
- activerecord-odbc-adapter (2.0)
- activerecord-sqlserver-adapter (2.3.8)
- dbd-odbc (0.2.5)
- dbi (0.4.5)
- deprecated (2.0.1)
Further, I copied odbc.so and odbc_utf8.so files from http://www.ch-werner.de/
My database.yml file looks like this -
development:
adapter: sqlserver
mode: ODBC
dsn:
username: myUserName
password: myPassword
No comments:
Post a Comment