Your first Ruby program is print ‘Hello World’ with ruby script. You can use an online embedded editor to execute any ruby script. Just copy the following codebase to the editor and click run button. You can see the output.
puts 'Hello World!'
Also here is another example of ruby program to add two numbers. You can execute this program to the editor.
puts 9 + 8
Here puts is a Ruby keyword which is used to print output of ruby statement. While executing any above ruby program you can see two line of result. The first is output of and another is return value of this statement.
Next: Execute Ruby Program