This first source code is the very basic Hello word!.
If you save this code
puts "Hello World"; |
as rubyhelloworld.rb
The file extension rb just stands for Ruby. To run the code from the command line, where you have saved the file above
ruby rubyhelloworld.rb
and the output will be
Hello World
Hope that helps people.