How can you hide database output in Rails console?

ActiveRecord::Base.logger = nil

from here


Short answer... In the file development.rb change or add the value of config.log_level so that there's a line like

config.log_level = :info

A better way of doing this is by typing this into the console:

ActiveRecord::Base.logger.level = 1 

as it prevents problems trying use a pointer to a logger that is set to nil (source: Disable Rails SQL logging in console)

To turn it back on

ActiveRecord::Base.logger.level = 0