Loading the ActiveRecord SQL Server adapter in a Rails 2.1 app

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.

© 2008-2021 Tim Riley. All rights reserved.