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 `register' for ActiveRecord::ConnectionAdapters:Module (NoMethodError) #3

Open
martinGerez opened this issue Feb 3, 2025 · 1 comment

Comments

@martinGerez
Copy link

I'm following the blog post, and after install the gem and try to install it, I've the following error:

.rvm/gems/ruby-3.2.1/gems/wasmify-rails-0.2.2/lib/wasmify-rails.rb:24:in `<main>': undefined method `register' for ActiveRecord::ConnectionAdapters:Module (NoMethodError)

ActiveRecord::ConnectionAdapters.register("nulldb", "ActiveRecord::ConnectionAdapters::NullDBAdapter", "active_record/connection_adapters/nulldb_adapter")
                                ^^^^^^^^^

Ruby version: ruby 3.2.1 (2023-02-08 revision 31819e82c8) [arm64-darwin21]
Rails version: Rails 7.1.5.1
Wasmify-rails version: .rvm/gems/ruby-3.2.1/gems/wasmify-rails-0.2.2

If I inspect the methods from ActiveRecord::ConnectionAdapters it doesn't have register method effectively:

> ActiveRecord::ConnectionAdapters.methods - Object.methods
> [:autoload_at, :eager_autoload, :eager_load!, :autoload_under]

I'm not sure if I'm missing something in the middle.

@palkan
Copy link
Owner

palkan commented Feb 4, 2025

It's been added in Rails 7.2 (that's the minimal version we test the gem with; I should have added this to Readme).

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

2 participants