On Friday, November 19, 2021 at 12:38:06 PM UTC-5, Sidney Reilley wrote:
> Ruby noob here! Using irb to learn.
Best to use a different environment.
- install the filewatcher gem
- create a test file named app.rb with proper ruby headers at the top
- create an alias in your .bash_profile like this:
kk='filewatcher "/users/sidney/app.rb" "clear; ruby /users/sidney/app.rb"'
in the terminal, type kk, and it will be running. When you edit the file and save it, it will run in the terminal. This is a much better option than irb.