getappmap / appmap-ruby

AppMap client agent for Ruby
https://appland.org
Other
100 stars 13 forks source link

ActiveRecord connector error [MakaraMysql2RgeoAdapter] #363

Open saurabhlime opened 2 months ago

saurabhlime commented 2 months ago

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'''
kgilpin commented 2 months ago

Do you have a stack trace with file paths and line numbers?

saurabhlime commented 2 months ago

Updated in the description