by @CodingExample

How to print hello world in Ruby

Home » ruby » How to print hello world in Ruby

In this example, you will learn about how to create and print a hello world program in ruby language.

  1. Create a new file called hello_world.rb.
  2. Add the following code.
hello_world.rb
puts "Hello World!"
  1. Run the above code by typing ruby hello_world.rb in your terminal and you will see Hello World!.