These are chat archives for rails-sqlserver/activerecord-sqlserver-adapter

Nov 2016
Nov 24 2016 08:59
Hi Dears
i need to connect rails with sqlserver 2012
how to do this ?
i spend more than 3 days searching
and i follow this steps

SQL Server (2005 or higher recommended)

Install the adapters and driver

gem install tiny_tds

gem install activerecord-sqlserver-adapter


Ensure the activerecord adapter and db driver gems are defined in your Gemfile

gem 'tiny_tds'

gem 'activerecord-sqlserver-adapter'


You should make sure freetds is configured correctly first.

freetds.conf contains host/port/protocol_versions settings.


A typical Microsoft server


host =

port = 1433

tds version = 7.1

If you can connect with "tsql -S servername", your basic FreeTDS installation is working.

'man tsql' for more info

Set timeout to a larger number if valid queries against a live db fail


now i get error
Gem Load Error is: undefined method add_order!' for class#<Class:ActiveRecord::Base>'
what i have to do
kindly i need some help
Nov 24 2016 10:22
Hi dears is anyone here
Ken Collins
Nov 24 2016 12:40
I think you are using Rails 5... you need to use Rails 4
gem install rails -v
rails _4.2.7.1_ new MYAPP --database=sqlserver
Nov 24 2016 13:03
Yes i am using rails 4
Sorry rails 5
So i have to use rails 4 ??
Ken Collins
Nov 24 2016 13:18
Yes... I am still working on Rails v5
Just got back into it last night.
Will be a few weeks till ready.
See top of README