I found this article describing a very easy way to write coloured texts to the console. The article describes this little example which seems to do the trick (I took the liberty to improve it slightly):
def colorize(text, color_code)
"e[#{color_code}m#{text}e[0m"
end
def red(text); colorize(text, 31); end
def green(text); colorize(text, 32); end
# Actual example
puts 'Importing categories [ ' + green('DONE') + ' ]'
puts 'Importing tags [' + red('FAILED') + ']'
Best seems to define some of the colours. You can extent the example when you need also different background colours (see bottom of article).
When using Window XP, the author mentions the requirement of a gem called win32console.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…