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

Ruby Ruby Basics (Retired) Ruby Numbers Ruby Numbers

Markus Henze
Markus Henze
1,798 Points

How to clear the irb

When the IRB commands go to the bottom of the screen they start to get cut off so I was wondering if there was a way to clear them without restarting the irb so this wouldn't happen.

2 Answers

Mike Costa
PLUS
Mike Costa
Courses Plus Student 26,362 Points

If you're using a mac or linux, you can press ctrl+L and it will clear the terminal window. As for windows, I found this link, but I can't test it cause I'm a mac user.

http://snipplr.com/view/3055/irb-clear-screen-on-windows/

Markus Henze
Markus Henze
1,798 Points

I'm on windows 10 and ctrl L worked for me.

Also, you can exit irb and type clear.