Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial


Colorizing IRB on Windows

I spent some time tonight trying to make IRB a little nicer to use on Windows. In particular I was jealous of the syntax coloring we see in the videos.

At first I tried to get things setup in Cygwin. For a couple of reasons this isn't optimal. For one, using rubyinstaller.org doesn't set everything up in Cygwin (since IRB is basically being run from batch file). Even after correcting this IRB was doing some funky things in Cygwin, such as repeating every command back to me :(

Going back to PowerShell (this also works in the regular cmd prompt) I found this post on Stack Overflow which got everything cooking.

On Windows Vista/7 the .irbrc containing those commands should go in C:\Users\Yourname\ (you'll probaby see a .irb_history file in there already).

1 Answer

Why not use Pry? It's a replacement for IRB and features syntax highlighting and more.