just ram

stuff I should remember

Connecting Ruby on Rails to Microsoft SQL Server

NOTE: These instructions are now seriously out of date. You may want to check out my always up to date ebook instead. The secret of connecting Rails to Microsoft SQL Server

It appears rails does not connect to MS SQL Server right out of the box. You need to do the following to get the connection to work:

Get the latest source distribution of Ruby-DBI and copy the file:




NOTE: The ADO directory does not exist on a standard install, you will need to create it.

Then simply set up your railsapp/config/database.yml

Here’s an example for reference:

  adapter: sqlserver
  database: database_name
  host: server_name
  username: user_name
  password: your_pw_here