tags:

views:

146

answers:

2

I'm having problems setting up wirble on XP machine. when i run IRB i get sth like this:

"foo".capitalize => ←[0;31m"←[0;0m←[0;36mFoo←[0;0m←[0;31m"←[0;0m

this occurs only if I call colorize on wirble either in .irbrc or after starting irb. I installed ruby 1.8.6 with the all-in-one installer. Any ideas on how to get colors working?

+1  A: 

Try this:

http://www.botvector.net/2008/06/colorized-wirble-in-windows-xp.html

(which was the first Google hit for "wirble windows")

Mike Woodhouse
A: 

First install these two gems:

gem install win32console
gem install wirble

Then in your irb console do:

require 'win32console'
include Win32::Console::ANSI
require 'wirble'
Wirble.init
Wirble.colorize

Your input will look corectly:

"foo".capitalize
=> "Foo"

(Foo is in blue on my screen now)

P.S. If you want irb always to start with these settings just put the above code in the '.irbrc' file in your home directory.

Hoornet