试一下这个 - 将活动记录日志发送到 null: if Rails.env.development? ActiveRecord::Base.logger = Logger.new('/dev/null') end