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 Multiplication and Division

CJ Jugarap
CJ Jugarap
2,517 Points

Is Jason clearing the screen or is he doing something else?

For example in this video, Multiplication and Division, on the time bar from 2:00 and 2:03, I'm not sure whether he 'cleared' the screen or if he jumped into another page? The difference would seem that if you created variables, 'clear' would clear all the code and 'jumping into another page' would retain all the variables created from the previous page. Please clarify?

Just type "exit" to leave irb ... .then type "clear". This will solve your issue, and you'll just need to type irb to re-enter the interactive ruby playground.

More explanation below.... but I see that this was a year ago, so I'm sure you got it by now.

10 Answers

Jason Seifer
STAFF
Jason Seifer
Treehouse Guest Teacher

Thanks for the heads up CJ Jugarap and Maciej Czuchnowski. I've reported the issue to our Workspaces team.

Hey Jason, I have posted a question and I want to tag you so that you can have a look at it. I don't how to tag u. Can u please help? By the way, the link is - https://teamtreehouse.com/forum/trying-to-nest-if-else-statements-and-getting-localjumperror-while-returning-values-need-help

Jason Seifer
STAFF
Jason Seifer
Treehouse Guest Teacher

CJ Jugarap What browser and operating system are you using?

CJ Jugarap
CJ Jugarap
2,517 Points

Currently using Opera and Windows 8.1

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

Same goes for Ubuntu with Chrome - the ctrl + L does not clear the screen, only puts ^L in the console.

Matthew Thompson
Matthew Thompson
4,500 Points

Same here. Non of the usual commands are working for me. ctl +L to clear and pressing the up arrow does not call the previous line written. All of this works in console just not when I enter irb. Is there a solution? Widows 8.1 using Chrome.

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

Notice that line numbers are continued: 010, 011

So he is definitely clearing the screen.

Were you asking about clearing the screen in Workspaces in your previous question? If so, ctrl + L in irb also gives me ^L. I was talking about pure console before. Not sure what Jason uses to clear console in the Workspace.

CJ Jugarap
CJ Jugarap
2,517 Points

Two different but seemingly similar questions so I put it as a different question. Knowing the shortcut and code to clearing the console is definitely helpful. Would be nice to know what Jason is doing in this instance as well =)

Maciej Czuchnowski
Maciej Czuchnowski
36,441 Points

Let's tag him and make him give us his secret: Jason Seifer

CJ Jugarap
CJ Jugarap
2,517 Points

Good idea! thumbs up

Jason Seifer
STAFF
Jason Seifer
Treehouse Guest Teacher

Maciej Czuchnowski CJ Jugarap I'm using ctrl + L to clear the screen :) I try and keep the text as centered as possible in the videos so it's easier to see :)

CJ Jugarap
CJ Jugarap
2,517 Points

Hey Jason thanks for checking in! In the video, you are in irb, however when I hit ctrl + L while in irb, I get ^L in the console. Is there a different command while you are in irb vs workspace console? Really enjoy learning from your instructions by the way. Thanks for sharing the knowledge!

Alan Fidelino
Alan Fidelino
12,846 Points

I hope this gets resolved as I really learn well doing code along. I can type with considerable speed but I cannot keep up and need to pause the video when I see the screen cleared and the shortcut doesn't work. I have the same experience as the others. I am enjoying the language though. Jason really has done well in making sure we learn the language by giving clear instructions. It's just the clearing that's the bummer!

Alan Fidelino
Alan Fidelino
12,846 Points

I hope this gets resolved as I really learn well doing code along. I can type with considerable speed but I cannot keep up and need to pause the video when I see the screen cleared and the shortcut doesn't work. I have the same experience as the others. I am enjoying the language though. Jason really has done well in making sure we learn the language by giving clear instructions. It's just the clearing that's the bummer!

Hey guys, ctrl+L works.

Hunter Rancourt
Hunter Rancourt
3,485 Points

I'm having the same issue. It only appears to effect irb.

OS X 10.9.5 Chrome Version 39.0.2171.99 (64-bit)

Brandon Keene
Brandon Keene
7,217 Points

I'm experiencing the same ^L issue running workspaces in Firefox 35 on Windows 7. However, I have had some success with

system 'clear'

though that will return => true before the prompt.

Rogelio Valdez
Rogelio Valdez
6,244 Points

Everybody said it "He is clearing the screen".

I just wanted to add that I am using OS X and while I am in irb I can clear the screen using ctrl + L (not cmd). I heard some of you guys were using windows have your tried using something like alt + L or another key instead of ctrl?

In mac you use cmd + C to copy in windows you use ctrl + C so ctrl in mac is not the same as ctrl in windows. Just saying, maybe the clear hotkey works but it is not supposed to be with ctrl (in windows). Hope this helps. Note: In mac (using safari) ctrl + L works in workspaces and in irb.

Guys .... Type exit to leave irb ... then typing clear into the console will clear out your console. Then just type irb again to re-enter the irb playground. :)

"Clear" is a simple built-in command that will clear your console of any previous work, it and any of the other shortcuts are not recognizable commands within irb. This means you must exit irb as I mentioned.

On Windows CTRL+L seems to work fine to clear irb screen. Using Chrome on Windows 7.