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

16th
Aug 2016
Nguyễn Bảo Thi
@baothi
Aug 16 2016 07:58
hello
i have rails on ubuntu 16.04 and connect sql server on window server 2012
i use gem https://github.com/rails-sqlserver/activerecord-sqlserver-adapter VS connect
but it error
DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original method using super. (called from <top (required)> at /home/baothi/Nanoco/config/application.rb:7) DEPRECATION WARNING: alias_method_chain is deprecated. Please, use Module#prepend instead. From module, you can access the original method using super. (called from <top (required)> at /home/baothi/Nanoco/config/application.rb:7) /home/baothi/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/bundler-1.12.5/lib/bundler/runtime.rb:89:in `rescue in block (2 levels) in require': There was an error while trying to load the gem 'activerecord-sqlserver-adapter'. (Bundler::GemRequireError) Gem Load Error is: undefined method `add_order!' for class `#<Class:ActiveRecord::Base>' Backtrace for gem load error is: /home/baothi/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/activesupport-5.0.0.1/lib/active_support/core_ext/module/aliasing.rb:37:in `alias_method'
here is my connect
development:
  adapter: sqlserver
  encoding: utf8
  database: N_PILOT
  host: 192.xxx
  port: 1433
  username: sa
  password: password
  pool: 5
  timeout: 5000
Nguyễn Bảo Thi
@baothi
Aug 16 2016 08:03
please help me
Ken Collins
@metaskills
Aug 16 2016 11:13
Please use Rails version 4.2.x, the Rails 5 adapter is not yet ready.
Nguyễn Bảo Thi
@baothi
Aug 16 2016 11:24
i use rails 5
ruby 2.3.1
Ken Collins
@metaskills
Aug 16 2016 11:25
You cant use Rails 5
Nguyễn Bảo Thi
@baothi
Aug 16 2016 11:25
why ?
Ken Collins
@metaskills
Aug 16 2016 11:25
Adapter is not ready for it.
Nguyễn Bảo Thi
@baothi
Aug 16 2016 11:25
so how do i can user rails ?
rails version ?
Ken Collins
@metaskills
Aug 16 2016 11:26
Use Rails 4.2.x
Nguyễn Bảo Thi
@baothi
Aug 16 2016 11:27
i don't know , why do rails 5 use can not but rails 4.2.x it can connect sql server
Ken Collins
@metaskills
Aug 16 2016 11:28
Adapter is not ready for Rails 5
Nguyễn Bảo Thi
@baothi
Aug 16 2016 11:31
so i must delete rails 5 and install rails 4.2.x agian ?
Ken Collins
@metaskills
Aug 16 2016 11:37
Yup
But you dont have to uninstall.
$ gem install rails -v 4.2.7.1
$ rails _4.2.7.1_ new myapp --database=sqlserver
Watch this pull request for updates on Rails v5 compatability in the adapter. rails-sqlserver/activerecord-sqlserver-adapter#502