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

MultiTenant throw undefined method `<<' for #<MultiTenant::ArelVisitorsDepthFirst:0x0000ffff8e8a3c78> with YJIT #253

Open
morieeeenyo opened this issue Aug 5, 2024 · 0 comments

Comments

@morieeeenyo
Copy link

morieeeenyo commented Aug 5, 2024

Overview

After enable YJIT I got the following error on my local while fetch data in multi tenancy context

NoMethodError - undefined method `<<' for #<MultiTenant::ArelVisitorsDepthFirst:0x0000ffffb658d250>:

And on rails console, I tried fetch data in multi tenant block and got following

[2] pry(main)> MultiTenant.with(Tenant.uuuo) do User.find(10) end
TypeError: no implicit conversion of Class into String
from /usr/local/bundle/gems/activerecord-6.1.7.8/lib/arel/collectors/plain_string.rb:15:in `<<'

I can fetch data with MultiTenant.without block

[4] pry(main)> MultiTenant.without do User.find(0) end
=> #<User:0x0000ffff7c3b44e0

My local environment

  • Enable YJIT with environment variable
RUBY_YJIT_ENABLE=1
  • ruby 3.2.4 with YJIT
c06a55bafd73:/app# ruby -v
ruby 3.2.4 (2024-04-23 revision af471c0e01) +YJIT [aarch64-linux-musl]
c06a55bafd73:/app# bin/rails r 'p RubyVM::YJIT.enabled?'
DEBUGGER[-e#190]: Attaching after process 135 fork to child process 190
Running via Spring preloader in process 190
true
  • activerecord-multi-tenant (1.2.0)
  • rails 6.1.7

I'm not seeing anything about this in the issue or changelog... am I missing something?

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

No branches or pull requests

1 participant