Using cmd to run Ruby

 

As I told in the previous lesson we can use Command Prompt (also known as cmd.exe or cmd) to run Ruby (which is interactive ruby).

steps:

  1. Click the Start menu, and then click Run or simply press  ⊞ Win +r 
  2. Type cmd into the dialog box.
  3. Wait for Command Prompt to come up.
  4. Type  irb
  5. Now you can start your first Ruby code!

 

 

8

Run box

1

run ruby by irb

2

ruby started running

3

type this simple code: 2+3 and press Enter

4

type other arithmetic Operators

exit

exit

 

Leave a comment