Here’s the list of thing you have to do in order to connect to Microsoft SQL Server (tested on 2005) with integrated connection (without any usernames passwords).
- Assuming you have installed Ruby on Rails. Go to Ruby\DBI and get the latest release of ruby-dbi package.
- Extract the package to some temporary folder and find file in directory: \lib\dbd\ADO.rb.
- Go to location of Rails installation (C:\Ruby by default) and traverse the directory path to: lib\ruby\site_ruby\1.8\DBD\
- Create a directory ADO
- Copy file ADO.rb (from the extracted package) to the newly created ADO directory.

This configuration will work for all you Rails applications.
In order to set up a proper connection to your database from your application edit config/database.yml file.
Here’s the example of what you should input if you use Windows Authentication.
adapter: sqlserver
database: Marcin
username:
password:
host: DBI:ADO:Provider=SQLOLEDB;Data Source=servername,port;Initial Catalog=databasename;Integrated Security=SSPI;Network=networkname_if_necessary;
Notice, that since we’re using Integrated Security we’re not leaving username and password blank. This greatly reduces the maintenance of this configuration file.