Well, you didn’t say that you are on the Windows operating system.
I usually work with several console windows open. One (or more) running irb, where I can quickly try out some Ruby expression (this is why I don’t have any need to just syntax-check them - I want to run them!) and one or more windows running some shell, from where I’m launchin programs and so on. Technically you could do all of this from within irb, but to what extend you consider it convenient, you have to find out by yourself. I find for many tasks using a shell easier than doing it from Ruby.
Since I don’t like neither the “old” Windows “DOS-shell” nor the Power Shell, I’m using on Windows the Cygwin environment, and within it I use the Z-Shell (zsh) as a shell, and mintty (which is also a Cygwin program) as a console (which I also prefer over the Windows console), but here again, this is a personal choice. I also run irb inside a mintty console.
I understand that, if you are new to programming in general, this might sound a bit complicated. Basically, you need two things for a start: A good text editor, and a console (which could be the Windows command prompt console), from which you will start several instances (some of those consoles running irb, some just the command prompt of your shell).
Just one note for the practical side: Once you have installed the text editor of your choice, set it up so that it generates files with just LF line endings (the default on Windows is usually CR LF). This saves you a lot of trouble if you later want to run your Ruby programs on, say, Linux, or in a Cygwin environment.