Before you start your first ruby program. Must sure that, You installed it.
If you don’t know how to install ruby, Please refer this link for a proper guideline : Link
Now, Open any text editor and write this program to check the first ruby program:
puts "Welcome to Ruby"
Save this file as “first.rb”
Note: Save Ruby program with .rb extension
Now, Using Terminal go to file path and type this command:
In the next line, You will get an output as:
Welcome to Ruby