Can anyone else replicate this? It seems like the fix would be to swap find_cmd_and_exec(...) in db_console.rb with ActiveRecord::Base.connection.class.find_cmd_and_exec.
It looks like the DBConsole method will be removed in Rails 7.2. However, in older implementations, find_cmd_and_exec in the rails repo dbconsole_command.rb causes an error. This happens because find_cmd_and_exec is being applied to the instance ActiveRecord::Base.connection rather than the class when the method is defined as a class method in AbstractAdapter.
I ran the following commands and ran into a dbconsole error.
bundle add litestack
.bundle install litestack
.rails generate litestack:install
bin/rails dbconsole
Can anyone else replicate this? It seems like the fix would be to swap
find_cmd_and_exec(...)
in db_console.rb withActiveRecord::Base.connection.class.find_cmd_and_exec
.It looks like the DBConsole method will be removed in Rails 7.2. However, in older implementations,
find_cmd_and_exec
in the rails repo dbconsole_command.rb causes an error. This happens becausefind_cmd_and_exec
is being applied to the instanceActiveRecord::Base.connection
rather than the class when the method is defined as a class method in AbstractAdapter.