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

CJ Jugarap
CJ Jugarap
2,517 Points

How do you clear the page when in Interactive Ruby?

I tried typing clear but learned that this doesn't work...

3 Answers

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

Two ways:

  1. Using Ctrl + L key combination

  2. Using system('clear') command

CJ Jugarap
CJ Jugarap
2,517 Points

Thanks for your response! system('clear') worked, however, the shortcut Ctrl + L is giving me ^L, and when I enter, turns ie: "irb(main):004:0>" to "irb(main):005:0*"

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

Are you under Windows or Mac? It works in my Ubuntu Linux, but I can imagine it's not universal for all operating systems ;)

CJ Jugarap
CJ Jugarap
2,517 Points

I'm on Windows actually. Maybe I should convert? =]

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

You should ALWAYS convert to Linux or Mac from Windows :). Ruby and Rails development is always harder under Windows and you can't fully follow the tutorials, since they use Unix-based systems. Use a virtual machine if you can (VMWare Player is my software of choice, now I moved to a dedicated ultrabook with Ubuntu).

CJ Jugarap
CJ Jugarap
2,517 Points

Thank you for the advice! My goal is to be a Ruby on Rails Developer so I may have to convert. I have no knowledge in Linux whatsover so learning that OS might be a new challenge I should undertake soon as well.

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

The installation should be simple and the use is not that difficult. And Treehouse has a course for using Console, so you should definitely check it out: http://teamtreehouse.com/library/console-foundations

use exit

Derrick Lyons
Derrick Lyons
1,915 Points

Just type "exit" in the terminal.