Gem Load Error is: undefined method alias_method_chain with Rails 5.2
Hello,
with the current stable rails version 5.2, i get the following message when i try to use the activerecord-sqlserver-adapter.
Gem Load Error is: undefined method `alias_method_chain'
Not ready yet. I'll need a few weeks.
Also looking for this to get fixed for 5.2. Attempted to try and see if I could fix this but I have no idea where alias_method_chain is being called from. 😞
@metaskills do you have a list or something like that of what is needed to support Rails 5.2? Maybe we can help you with PRs.
Will to help as well.
I tried changing alias_method_chain to more verbose alias_method calls, but ran into an issue where ActiveRecord::Base doesn't have a method called add_order! anymore.
@metaskills Do you have an update on this? Is this something we can help with?
@metaskills would it be possible to update us on this issue? Much appreciated.
In regards to alias_chain_method. It seems to me that upgrading to Rails 5 and bundling drops the version of activerecord-sqlserver-adapter to a very old version (2.3.8 for me). I pulled down the gem from github in order to start working on a pull request for Rails 5 and searching the project for alias_chain_method through Ag tells me it no longer even exists in the project.
The problem I'm running into instead is that it seems the arel API has changed? First error that I hit running on my local gem is the line require 'arel/visitors/bind_visitor in lib/arel_sqlserver.rb. I hope I can continue to work on this because this is the one big thing (so far) that's stopping us from being able to upgrade to Rails 5. Bummer.
FWIW I found https://github.com/matthewdunbar/activerecord-sqlserver-adapter on the Network tab and there seems to be some progress on Rails 5.2. I tried running the test suite with that fork and it is still failing a lot. @matthewdunbar can you share any insights on your progress?
I didn't put a lot of time into it, so I never actually got the tests set up. I was just testing it within one of my apps and making changes as I found issues. The issue I got stuck on was how to handle cached statements (I'm not well versed on Active Record internals so wasn't entirely sure what I was doing).
@davekaro I pushed some changes to master on my branch last week and now there are only about 40 failing tests. I think the gem might still mostly work despite the failing tests as it appears to be working correctly on my app.
I think this issue can be closed in favor of #636
@matthewdunbar you might want to comment on that other issue with your progress on Rails 5.2. Maybe open a PR that is work in progress.
Closing this in favour of #636.