Tim Riley

Loading the ActiveRecord SQL Server adapter in a Rails 2.1 app

June 18th 2008

It’s pretty simple. In your config/environment.rb:

config.gem 'activerecord-sqlserver-adapter', :source => 'http://gems.rubyonrails.org', :lib => 'active_record/connection_adapters/sqlserver_adapter'

Then run rake gems:install and away you go.

Hugh has some more tips about the packages and configuration required to connect to an SQL Server from a Linux platform.

Tim Riley

Hi, I'm Tim Riley. I'm a web developer based in Canberra, Australia, where I work at a small design studio called Icelab. This is my blog, where I can share with you the things I learn as I go about building products for the web.

What I Build

Recent Presentations

  1. Facebook Authentication with OAuth
  2. JavaScript Testing with Capybara and Cucumber
  3. Using Titanium to Build Mobile Apps with JavaScript (audio)
  4. An Introduction to Sinatra
  5. Building your Capistrano Recipe Book