"Optimized for programmer happiness." Elegant, expressive, and the language that made Rails — the framework that defined modern web conventions.
← Back to Server Sidenil.class Customer attr_reader :name, :age def initialize(name, age) @name, @age = name, age end def adult? @age >= 18 end end adults = customers.select(&:adult?).sort_by(&:name) 5.times { |i| puts "Hello #{i}" }
Blocks are anonymous chunks of code passed to methods — Ruby's signature feature. each, map, select all take blocks.
Define methods at runtime, modify existing classes (even built-ins), build internal DSLs. Powers Rails' magic has_many :orders-style syntax.
| Category | Tools |
|---|---|
| Package mgr | RubyGems, Bundler |
| Web framework | Ruby on Rails, Sinatra, Hanami |
| Test | RSpec, Minitest, Capybara |
| Background jobs | Sidekiq, Resque |
| Notable users | GitHub, Shopify, Airbnb (early), Stripe (internal tools) |
Rails & Hotwire for fast iteration on CRUD-heavy apps.
Ruby's metaprogramming makes building internal DSLs effortless.
Chef, Vagrant, Capistrano are Ruby-based.
Shopify is the largest Rails app on earth.