1

Ctrl-l doesn't seem to work, neither does clear.

The only way I've found is to run system('clear') which I find clunky.

Is there a way to get the same Ctrl-l functionality in the terminal inside the rails console?

Edit:

I put the following in my ~/.pryrc:

def c
  system 'clear'
end

Which is working.

But why does Ctrl-l work on Rails 4 but not Rails 5?

mbigras
  • 7,664
  • 11
  • 50
  • 111
  • Possible duplicate of [How can I clear the terminal in Ruby?](http://stackoverflow.com/questions/3170553/how-can-i-clear-the-terminal-in-ruby) – Richard_G Dec 03 '16 at 01:40
  • Search on "ruby clear console" for many past proposed solutions, none much better than what you have FWIW. – Richard_G Dec 03 '16 at 01:48
  • This is not a duplicate question and is not an issue in Ruby the language. I'm having the same issue with the Rails 5 console. `Ctrl+l` works properly in IRB (MRI v2.3.1), but in the Rails 5 console it opens a new line in the REPL without clearing the screen as expected. – fbonetti Sep 12 '17 at 14:28

0 Answers0