How to: turn off ANSI codes in Rails console
Small tip: when you happen to be running Rails in a console that doesn’t understand ANSI codes (those pesky ←[4;36;1m and ←[0;1m that clutter your display), like for example Windows’ cmd, you can turn them off with:
if RUBY_PLATFORM =~ /mswin32/ ActiveRecord::Base.colorize_logging = false end
Put this in config/environments/development.rb and restart script/server.
Took me a while to find it, so I thought I’d post it for posterity :)




useful thanks
acemtp said this on 2009-06-26 at 14:23:15