Did you know that you can show your executed query in your

1
Rails Console
. If you have ever face problem and want to see the query or even debug your query, you can activate it in your
1
Rails Console
. Simply execute this code in the
1
Rails Console
:

1
ActiveRecord::Base.logger = Logger.new(STDOUT)

That command will print logger in your

1
Rails Console
. If that command don’t work you can try to clear base connection first

1
ActiveRecord::Base.connection_pool.clear_reloadable_connections!

Just try something as usual like

1
User.all
if you have model
1
User
.

Is that work now?