getappmap / getappmap/appmap-ruby
ActiveRecord connector error [MakaraMysql2RgeoAdapter]
Nobody has claimed this yet.
- Dominant language
- Ruby
- Stars
- 101
- Forks
- 13
- PR merge metrics
- No merged PRs in 30d
Description
I was installing the gem in our project and got an error regarding a connector that we use "MakaraMysql2RgeoAdapter"
AppMap encountered an error inspecting a ActiveRecord::ConnectionAdapters::MakaraMysql2RgeoAdapter: undefined method `provide' for nil:NilClass
Sequel::Error (No database associated with Sequel::Model: have you called Sequel.connect or Sequel::Model.db= ?)
This error was thrown on a POSTMAN request of an endpoint. It works for certain Rspec test cases and does not for others.
Ruby: ruby 3.0.5p211 (2022-11-24 revision ba5cf0f7c5) [arm64-darwin21]
Rails: Rails 6.1.7.6
Started` GET "/api/rider/v1/login?phone=4085550001&platform=Android" for ::1 at 2024-08-17 22:33:21 -0600
AppMap encountered an error inspecting a ActiveRecord::ConnectionAdapters::MakaraMysql2RgeoAdapter: undefined method `provide' for nil:NilClass
Sequel::Error (No database associated with Sequel::Model: have you called Sequel.connect or Sequel::Model.db= ?):
lib/active_record/connection_adapters/makara_mysql2rgeo_adapter.rb:78:in `active_record_connection_for'
lib/active_record/connection_adapters/makara_mysql2rgeo_adapter.rb:8:in `new'
lib/active_record/connection_adapters/makara_mysql2rgeo_adapter.rb:8:in `makara_mysql2rgeo_connection'
app/middleware/load_shedding_middleware.rb:11:in `call'
Started GET "/api/rider/v1/login?phone=4085550001&platform=Android" for ::1 at 2024-08-17 22:34:44 -0600
AppMap encountered an error inspecting a ActiveRecord::ConnectionAdapters::MakaraMysql2RgeoAdapter: undefined method `provide' for nil:NilClass
Sequel::Error (No database associated with Sequel::Model: have you called Sequel.connect or Sequel::Model.db= ?):
lib/active_record/connection_adapters/makara_mysql2rgeo_adapter.rb:78:in `active_record_connection_for'
lib/active_record/connection_adapters/makara_mysql2rgeo_adapter.rb:8:in `new'
lib/active_record/connection_adapters/makara_mysql2rgeo_adapter.rb:8:in `makara_mysql2rgeo_connection'
app/middleware/load_shedding_middleware.rb:11:in `call'''
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the POSTMAN request with Ruby 3.0.5, Rails 6.1.7.6, and the MakaraMysql2RgeoAdapter configuration. Read lib/active_record/connection_adapters/makara_mysql2rgeo_adapter.rb around line 78 and app/middleware/load_shedding_middleware.rb:11; done means the connector initializes without the reported nil provide error across the affected requests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rails, ruby
- Domain
- backend, database
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100