I am playing with the console, I change some model code and now I want to test it. I normally re-start the console. Is there a quicker way? Maybe a console command to reload the model code?
Simply type in the “reload!” command after making changes and the console will reload the session. The “reload!” command is limited in the sense that objects that were instantiated before the reload session will only have access to the initial code prior to any changes.
Clearing the Console You can also use Ctrl + L to clear the screen, which works on both Mac and Linux. If you're on Windows, the only way we're aware of to clear the console is by typing system('cls') . The Windows cls command clears the screen, and the Ruby system method runs that command in a subshell.
Of course, simply type:
reload!
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With