IRB prettification

5 views
Skip to first unread message

Nicole Ramsey

unread,
Aug 25, 2011, 3:49:15 PM8/25/11
to pdxtw...@googlegroups.com
Since a lot of experimentation and learning happens in IRB I have a customized .irbrc file I thought I would share. It makes the output a little easier on the eyes. I cobbled it together from things I'd read so I can't guarantee it's the prettiest implementation, but it works for me and I found myself playing with code more in IRB sessions because of it. If anyone wants to chime in with other tricks and tips I can add, that would be awesome.


You can access your own .irbrc file in Terminal at the prompt by doing one of the following:

If you have TextWrangler's shell shortcuts hooked up
edit ~/.irbrc

If you don't have TextWrangler's shell shortcuts hooked up
open -a TextWrangler ~/.irbrc  
**NOTE: You can replace whatever text editor you do use where TextWrangler is typed in, you'd just put your preferred editor name there**

If you get message that the file doesn't exist, no worries. Just do touch ~/.irbrc and then go back to do one of the steps above. There probably is a way to touch and open at the same time, I just haven't looked it up yet ;).

Thanks to all who organized and volunteered for this workshop. It was the shot of enthusiasm I needed to get my own learning kickstarted again.

Nicole
Reply all
Reply to author
Forward
0 new messages