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

undefined method `visit_SearchCopGrammar_Nodes_FulltextExpression' for an instance of SearchCop::Visitors::Visitor #80

Closed
andrewkendall opened this issue May 28, 2024 · 4 comments · Fixed by #81

Comments

@andrewkendall
Copy link

andrewkendall commented May 28, 2024

I've started to see a new issue which throws the error:

undefined method visit_SearchCopGrammar_Nodes_FulltextExpression for an instance of SearchCop::Visitors::Visitor

It's trigger by:

  search_scope :search do
    attributes :title, :content
    options :title, type: :fulltext # This is the cause, removing stops the error
  end

It seems to have happened around the time of the Rails 7.1 and Ruby 3.3 upgrade I performed.

I'm trying to track down the exact cause now, but thought I would post in case anyone else is seeing the same.

@andrewkendall
Copy link
Author

andrewkendall commented May 28, 2024

It looks like I've found the cause, it's moving from the Mysql2 gem to Trilogy (https://github.com/trilogy-libraries/trilogy).

As far as I understand, Trilogy is set to be the new default in Rails 8.

https://guides.rubyonrails.org/7_1_release_notes.html#introduce-adapter-for-trilogy
https://dev.to/pimp_my_ruby/benchmarking-trilogy-is-it-really-the-future-of-rails--3neg

@mrkamel
Copy link
Owner

mrkamel commented May 29, 2024

thanks for opening. i'll check asap

@mrkamel
Copy link
Owner

mrkamel commented May 29, 2024

will be fixed via #81

@andrewkendall
Copy link
Author

Excellent work! All looking good.

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

Successfully merging a pull request may close this issue.

2 participants