# output to go into the log file (i.e logs/test.log) Rails.logger.debug variable.inspect Rails.logger.debug variable.to_yaml # output in the console require 'pp' it 'does something' thing = Factory(:something) pp thing end # or put s thing.to_yaml