Description #
Ruby is a dynamic, open-source, interpreted programming language known for its simplicity, flexibility, and focus on developer happiness. It’s used in general-purpose scripting and is especially well-known for powering the popular web framework Ruby on Rails.
History #
Ruby was created by Yukihiro “Matz” Matsumoto in 1995 in Japan. Matz wanted a language that blended the object-oriented features of Smalltalk with the practicality of Perl and the elegance of Python.
Key milestones include:
- Ruby 1.0 (1996) – the first release
- Ruby 1.8 (2003) – gained traction internationally
- Ruby on Rails (2004) – web development boom
- Ruby 2.x (2013–2020) – added performance, concurrency improvements
- Ruby 3.0 (2020) – focused on speed, concurrency, and developer experience
Ruby became especially popular in the startup world due to Rails’ productivity and convention-over-configuration philosophy.
Hello World Code #
puts "Hello, World!"
How to Run #
Using the Command Line: #
- Save the code in a file called
hello.rb
- Run it with:
ruby hello.rb
Using Interactive Ruby (IRB): #
- Type
irb
in your terminal - Enter:
puts "Hello, World!"
Key Concepts #
puts
— prints output with a newline
Everything is an object — even integers and strings
No semicolons needed
Readable syntax — feels natural and expressive
Uses blocks and iterators (e.g. .each
, .map
)
Dynamic typing — variable types inferred
Duck typing — behavior over strict types
Built-in exception handling
Core of Ruby on Rails for web apps
Designed with developer happiness in mind
Try It Online #
🔗 Replit – Ruby
🔗 Try Ruby (Interactive)
🔗 Paiza.IO – Ruby
Fun Facts #
Ruby’s creator, Matz, still leads the language’s development
The Ruby motto is: “Optimizing for programmer happiness”
Ruby was designed with human readability as a priority
The official package manager is called RubyGems
Twitter, GitHub, Shopify, and Airbnb started on Ruby on Rails