8

I want to create an application on Rails 4 that would use existent MS SQL database. This application could greatly benefit from using Rails 4 and all its new features But it seems the gem everyone recomend to use - activerecord-sqlserver-adapter doesn't support rails 4.0.0 - https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/issues/250 Does anyone could advice is there any other ways to connect to MS SQL Server without using this gem? Thanks in advance!

  • You might need to wait it out. Rails 4 isn't released yet, not even a release candidate is out yet, so many gems not just one will just plain NOT work. I did some searching and `activerecord-sqlserver-adapter` is the only Microsoft Database driver. – Mab879 Mar 22 '13 at 03:59

5 Answers5

2

I just found this fork while looking for the same: https://github.com/arthrex/activerecord-sqlserver-adapter. Can't say how complete it is.

elight
  • 86
  • 5
2

You can try below gem to use MS SQL Server 5 and higher with Rails 4.

sudo gem install sic-activerecord-sqlserver-adapter

This will work with Rails 4 definitely, i have tried this. thanks.

Another, good news, rails 4 supportive version released for activerecord-sqlserver-adapter

now we can use below gem for MS-SQL with Rails 4

gem 'activerecord-sqlserver-adapter', '~> 4.0.0'

along with Runtime Dependencies

activerecord ~> 4.0.0
Rameshwar Vyevhare
  • 2,699
  • 2
  • 28
  • 34
1

There is an update from the discussion from issue: https://github.com/rails-sqlserver/activerecord-sqlserver-adapter/pull/278

IMHO, the best fork so far (that I could test) is https://github.com/annaswims/activerecord-sqlserver-adapter/tree/rails-4 mainly for beeing transparent about the progress on the test base.

Aitherios
  • 96
  • 2
  • Thanks! My fork is now merged into https://github.com/rails-sqlserver/activerecord-sqlserver-adapter. It's one complicated Arel fix away from being released. – Anna Feb 07 '14 at 05:24
0

The adapter now supports v4.2 as well. https://github.com/rails-sqlserver/activerecord-sqlserver-adapter

MetaSkills
  • 1,954
  • 18
  • 15