New app Rails 4 with SqlServer

1,278 views
Skip to first unread message

André Lima

unread,
Aug 7, 2013, 1:07:59 PM8/7/13
to rails-sqlse...@googlegroups.com
Friends.

I created new app with rails 4 ( rails new app -d sqlserver ), after config database similar another app with rails 3. I get this error:

/home/vagrant/local/ruby/gems/gems/activesupport-4.0.0/lib/active_support/core_ext/module/aliasing.rb:32:in `alias_method': undefined method `add_order!' for class `Class' (NameError)
from /home/vagrant/local/ruby/gems/gems/activesupport-4.0.0/lib/active_support/core_ext/module/aliasing.rb:32:in `alias_method_chain'
from /home/vagrant/local/ruby/gems/gems/activerecord-sqlserver-adapter-2.3.8/lib/active_record/connection_adapters/sqlserver_adapter/core_ext/active_record.rb:14:in `singleton class'
from /home/vagrant/local/ruby/gems/gems/activerecord-sqlserver-adapter-2.3.8/lib/active_record/connection_adapters/sqlserver_adapter/core_ext/active_record.rb:12:in `included'
from /home/vagrant/local/ruby/gems/gems/activerecord-sqlserver-adapter-2.3.8/lib/active_record/connection_adapters/sqlserver_adapter/core_ext/active_record.rb:145:in `include'
from /home/vagrant/local/ruby/gems/gems/activerecord-sqlserver-adapter-2.3.8/lib/active_record/connection_adapters/sqlserver_adapter/core_ext/active_record.rb:145:in `<top (required)>'
from /home/vagrant/local/ruby/gems/gems/activerecord-sqlserver-adapter-2.3.8/lib/active_record/connection_adapters/sqlserver_adapter.rb:3:in `require'
from /home/vagrant/local/ruby/gems/gems/activerecord-sqlserver-adapter-2.3.8/lib/active_record/connection_adapters/sqlserver_adapter.rb:3:in `<top (required)>'
from /home/vagrant/local/ruby/gems/gems/activerecord-sqlserver-adapter-2.3.8/lib/activerecord-sqlserver-adapter.rb:1:in `require'
from /home/vagrant/local/ruby/gems/gems/activerecord-sqlserver-adapter-2.3.8/lib/activerecord-sqlserver-adapter.rb:1:in `<top (required)>'
from /home/vagrant/local/ruby/gems/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `require'
from /home/vagrant/local/ruby/gems/gems/bundler-1.3.5/lib/bundler/runtime.rb:72:in `block (2 levels) in require'
from /home/vagrant/local/ruby/gems/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `each'
from /home/vagrant/local/ruby/gems/gems/bundler-1.3.5/lib/bundler/runtime.rb:70:in `block in require'
from /home/vagrant/local/ruby/gems/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `each'
from /home/vagrant/local/ruby/gems/gems/bundler-1.3.5/lib/bundler/runtime.rb:59:in `require'
from /home/vagrant/local/ruby/gems/gems/bundler-1.3.5/lib/bundler.rb:132:in `require'
from /vagrant/logs/config/application.rb:7:in `<top (required)>'
from /home/vagrant/local/ruby/gems/gems/railties-4.0.0/lib/rails/commands.rb:76:in `require'
from /home/vagrant/local/ruby/gems/gems/railties-4.0.0/lib/rails/commands.rb:76:in `block in <top (required)>'
from /home/vagrant/local/ruby/gems/gems/railties-4.0.0/lib/rails/commands.rb:73:in `tap'
from /home/vagrant/local/ruby/gems/gems/railties-4.0.0/lib/rails/commands.rb:73:in `<top (required)>'
from bin/rails:4:in `require'
from bin/rails:4:in `<main>'

My Gemfile is:

gem "rails", "4.0.0"
gem "tiny_tds"
gem "activerecord-sqlserver-adapter"
gem "sass-rails", "~> 4.0.0"
gem "uglifier", ">= 1.3.0"
gem "coffee-rails", "~> 4.0.0"
gem "jquery-rails"
gem "turbolinks"

Thanks you for helping me!

KLausG

unread,
Aug 8, 2013, 7:54:36 AM8/8/13
to rails-sqlse...@googlegroups.com
Please have a look at the other thread: https://groups.google.com/forum/#!topic/rails-sqlserver-adapter/PWIobkN7FOg
Friends.

I created new app with rails 4 ( rails new app -d sqlserver ), after config database similar another app with rails 3. I get this error:

SportApps95

unread,
Dec 20, 2013, 2:05:44 AM12/20/13
to rails-sqlse...@googlegroups.com
Hi KLausG and André Lima,

I got the same error "add_order!" for RoR 4.0 with the activerecord-sqlserver-adapter.
Did you fix this problem in the main while?
And how?

Hope you can help me, because this is a real though one.
Thanks!!

Joris


Op donderdag 8 augustus 2013 13:54:36 UTC+2 schreef KLausG:

Jonathan Frazier

unread,
Dec 17, 2014, 6:37:52 AM12/17/14
to rails-sqlse...@googlegroups.com
This gem has a rational versioning policy where the gem version mirrors there rails version. It looks like you're using the wrong version of the adapter. The 2.3 adapter works with Rails 2.3. You should bump the version in your gem file for sqlserver-adapter to "~> 4.0.0".
Reply all
Reply to author
Forward
0 new messages