AICollection Help

Hello, World

Hello World Example in Ruby

Here is a simple "Hello, World!" program written in Ruby:

# hello.rb puts 'Hello, World!'

Instructions to Run the Ruby Program

  1. Save the Code: Save the above code in a file named hello.rb.

  2. Run the Program: Use the Ruby interpreter to run the program. Open a terminal and navigate to the directory containing hello.rb. Run the following command:

    ruby hello.rb

    You should see the output:

    Hello, World!

Summary

  1. Save the code in hello.rb.

  2. Run with ruby hello.rb.

Last modified: 01 January 2025