Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gem Load Error is: undefined method alias_method_chain with Rails 5.2 #647

Closed
juice opened this issue Apr 12, 2018 · 13 comments
Closed

Gem Load Error is: undefined method alias_method_chain with Rails 5.2 #647

juice opened this issue Apr 12, 2018 · 13 comments

Comments

@juice
Copy link

juice commented Apr 12, 2018

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'

@metaskills
Copy link
Contributor

Not ready yet. I'll need a few weeks.

@QuintinAdam
Copy link

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. 😞

@wpolicarpo
Copy link
Member

@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.

@mzelina
Copy link

mzelina commented May 18, 2018

Will to help as well.

@brandoncordell
Copy link

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.

@dmbrooking
Copy link

@metaskills Do you have an update on this? Is this something we can help with?

@jamalawd
Copy link

@metaskills would it be possible to update us on this issue? Much appreciated.

@brandoncordell
Copy link

brandoncordell commented Jun 12, 2018

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.

@davekaro
Copy link

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?

@matthewdunbar
Copy link
Contributor

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).

@matthewdunbar
Copy link
Contributor

@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.

@davekaro
Copy link

davekaro commented Jul 5, 2018

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.

@wpolicarpo
Copy link
Member

Closing this in favour of #636.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

10 participants