Ruby Tutorial
Ruby is an open-source, object-oriented, server-side scripting language designed and developed in the mid-1990s by Yukihiro Matsumoto (まつもとゆきひろ/Yukihiro Matsumoto) of Japan. In the Ruby community, Matsumoto is also known as Matz. Ruby runs on many platforms, such as Windows, MAC OS, and various versions of UNIX.
By studying this tutorial, you will gain a comprehensive understanding of Ruby.
Who should read this tutorial?
This tutorial helps beginners understand the fundamentals and basic concepts of the Ruby language.
Knowledge you need before reading this tutorial:
Before you start practicing the various examples provided in this tutorial, it is best to already have a basic understanding of computer programs and programming languages, which will help you with this tutorial.
Compiling/Executing a Ruby Program
For most programming languages, the first introductory example is "Hello World!". The following example uses Ruby to output "Hello World!":
Example
!/usr/bin/ruby
puts
"
Hello World!
"
;
Run Example »
Click the "Run Example" button to see the online example running result.
Or in the irb interactive command-line mode:
>>puts "Hello, world!"
Hello, world!
=> nil