How to print SQL to standard out with script/console and irb
ActiveRecord::Base.logger = Logger.new(STDOUT)
ActiveRecord::Base.logger = Logger.new(STDOUT)
Use the following command to print from VIM. The command will generate an HTML page:
:TOhtml