Ruby and Rails
Abstract
Ruby was created by Yukihiro “Matz” Matsumoto in Japan, named on 24 February 1993 and first released on 21 December 1995. He wanted “a scripting language that was more powerful than Perl, and more object-oriented than Python,” and said his aim was to make programmers happy. For nearly a decade Ruby was popular mainly in Japan. In July 2004 the Danish programmer David Heinemeier Hansson released Ruby on Rails, a web framework extracted from the project-management application Basecamp, and Ruby became the language of a generation of web startups, among them Twitter, GitHub, Shopify and Airbnb. Rails’s conventions (database migrations, generators, RESTful routes, “convention over configuration”) were copied by frameworks in most other languages. Twitter’s outages of 2007 and 2008 and its partial move to Scala and Java made “Rails can’t scale” a standing criticism; Shopify answered it by running one of the largest Rails applications in the world. Ruby 4.0 was released on 25 December 2025, the language’s thirtieth anniversary.
Matz and the Pursuit of Joy
Yukihiro Matsumoto, known as Matz, was a programmer in Japan who had studied programming languages at the University of Tsukuba. In early 1993 he decided to write his own object-oriented scripting language. He later explained the choice in a 1999 post to the ruby-talk mailing list: he knew Perl but did not like it much, and he knew Python but did not consider it a true object-oriented language. “I wanted a scripting language that was more powerful than Perl, and more object-oriented than Python.”
The name was settled on 24 February 1993 in an online chat with his colleague Keiju Ishitsuka. The candidates were “Coral” and “Ruby”; Matz chose Ruby, in part because it was a colleague’s birthstone. The first public version, 0.95, was announced on Japanese Usenet newsgroups on 21 December 1995, and Ruby 1.0 followed on 25 December 1996. Christmas Day became the traditional date for major Ruby releases.
Matz stated his design goal in unusually personal terms: “I hope to see Ruby help every programmer in the world to be productive, and to enjoy programming, and to be happy. That is the primary purpose of Ruby language.” He described the guiding rule as the principle of least surprise, meaning that the language should behave the way an experienced programmer expects, and he was explicit that this meant his own expectations.
The language combined Smalltalk’s object model with Perl’s practicality for text and system scripting and Lisp’s closures and metaprogramming (see The OOP Revolution). In Ruby everything is an object, including integers, true and nil. Methods can be called without parentheses. Blocks, chunks of code passed to a method, replaced most loops: 5.times { |i| puts i } or orders.select { |o| o.paid? }. Classes stay open, so a program can add methods to existing classes, including the built-in ones, while it runs. These features made it possible to write libraries that read like small special-purpose languages, a style Rails later relied on.
Arriving in the West
For its first years Ruby was documented almost entirely in Japanese, and it spread in Japan faster than elsewhere. The English-language mailing list ruby-talk started in 1998. The turning point outside Japan was a book: Dave Thomas and Andy Hunt, authors of The Pragmatic Programmer, published Programming Ruby: A Pragmatic Programmer’s Guide on 15 December 2000. Readers called it “the Pickaxe” after the tool on its cover, and its authors put its full text online. Ruby 1.8, released in August 2003, became the stable version that most Western programmers first used, and remained supported until June 2013.
Rails
In 2003 a Danish student, David Heinemeier Hansson (known as DHH), was working remotely for the small Chicago design firm 37signals, building a project-management web application called Basecamp. He wrote it in Ruby and, along the way, built the framework he wished he had. In July 2004 he released the framework as open source under the name Ruby on Rails.
Rails arrived when web development in Java was dominated by large frameworks configured through XML files, and PHP applications were often written without much structure. Rails offered a complete stack with strong opinions, organized around two principles:
- Convention over configuration. Rails assumed sensible defaults: a model class named
Ordermaps to a database table namedorders, its controller lives inorders_controller.rb, and its views inapp/views/orders/. Programmers who followed the conventions wrote almost no configuration. - Don’t repeat yourself. Each piece of information should be stated once. Rails’s object-relational mapper, Active Record, read column names from the database at runtime, so a model class could be nearly empty.
Rails also popularized practices that became standard: migrations, versioned Ruby files that change the database schema step by step; generators and scaffolding that create a working skeleton of an application; an integrated testing setup; the Model-View-Controller pattern as the default architecture of web applications; and RESTful routing, in which URLs and HTTP verbs map to a fixed set of controller actions.
In 2005 DHH recorded a screencast in which he built a simple blog in fifteen minutes, narrating as he typed. For developers used to days of setup, it was the most effective advertisement Rails ever had. Rails 1.0 was released on 13 December 2005. In August 2006 Apple announced that Rails would ship with Mac OS X 10.5 Leopard, which came out in October 2007.
The Startup Engine
Rails became the default technology of the web startups of the late 2000s (see The Social Media Revolution). Twitter was built on it in 2006, GitHub in 2008, and Shopify, Airbnb, Hulu, Twitch, Dribbble, Kickstarter and Basecamp itself ran on it. By January 2016 more than 1.2 million websites used Rails.
An ecosystem grew around the framework. RubyGems packaged libraries, Bundler pinned their versions, RSpec and Cucumber shaped the practice of behavior-driven development, and Capistrano automated deployment. Heroku, founded in 2007 by Orion Henry, James Lindenbaum and Adam Wiggins, started as a hosting platform for Ruby applications where a developer could deploy with a single git push; Salesforce bought it in December 2010 for about $212 million. Frameworks in other languages, from Django in Python and Laravel in PHP to Phoenix in Elixir, copied Rails’s structure and conventions.
The community was known for its energy and its quarrels. The most famous was the essay “Rails Is A Ghetto”, posted on 31 December 2007 by Zed Shaw, the author of Mongrel, the web server most Rails applications then ran on, in which he attacked leading Rails developers and companies by name and announced that he was leaving. The community’s other legend was the pseudonymous why the lucky stiff, author of a cartoon-filled Ruby textbook, who deleted his online presence in 2009.
Rails itself absorbed its main competitor: in December 2008 the core teams announced that the rival framework Merb would be merged into Rails, and the result shipped as Rails 3.0 in 2010.
The Scaling Argument
The criticism that followed Rails for twenty years was performance. Ruby’s original interpreter walked the program’s syntax tree directly and was slow even for an interpreted language, and Rails added layers on top.
The case everyone cited was Twitter. During its rapid growth in 2007 and 2008 the service failed so often that its error page, an illustration of a whale being lifted by birds drawn by the artist Yiying Lu, became known as the “Fail Whale”. Twitter moved its message queue from Ruby to a Scala server called Kestrel in 2009, and in 2011 replaced its Rails search front end with a Java server called Blender, which cut search latency at the 95th percentile from 800 to 250 milliseconds. The rest of the Rails code was gradually replaced by services on the JVM (see The JVM and Java Ecosystem). Heinemeier Hansson replied that Twitter’s scaling problems came from its own architectural decisions rather than from Rails.
Ruby’s implementation got faster. Ruby 1.9 (2007) replaced the tree-walking interpreter with a bytecode virtual machine, YARV, written by Koichi Sasada. Ruby 2.0 was released on the language’s twentieth anniversary, 24 February 2013. Matz set the goal “Ruby 3x3”, making Ruby 3 three times faster than Ruby 2.0, and Ruby 3.0, released on 25 December 2020, met it on the benchmark chosen. YJIT, a just-in-time compiler developed at Shopify by a team led by Maxime Chevalier-Boisvert, was merged into Ruby 3.1 in December 2021 and declared production-ready in Ruby 3.2.
Shopify became the counterexample to the scaling argument. It kept its core commerce application as one large Rails “monolith” rather than splitting it into microservices, contributed to Ruby and Rails directly, and during the Black Friday sales of 2023 its core application served close to a million requests per second at peak. Heinemeier Hansson called it “the busiest and biggest Rails app in the world.” GitHub likewise still runs its main application on Rails.
Standards and Later Years
Ruby became a Japanese Industrial Standard (JIS X 3017) in 2011 and an international standard, ISO/IEC 30170, in 2012. Other implementations grew up alongside Matz’s: JRuby on the Java virtual machine, mruby for embedded systems, TruffleRuby on GraalVM and Rubinius, which tried to implement as much of Ruby as possible in Ruby itself.
Rails continued with major versions roughly every three years: 4.0 (2013), 5.0 (2016), 6.0 (2019), 7.0 (2021) and 8.0 (November 2024). Heinemeier Hansson, still a partner at 37signals, used the later versions to argue against the industry’s turn to complex JavaScript front ends and cloud platforms. Rails 7 promoted Hotwire, which sends HTML rather than JSON to the browser, and Rails 8 aimed to let individual developers host and run their own applications without a platform-as-a-service. His public positions made him a divisive figure in the community he had built; in April 2021, after he and Jason Fried banned political discussions at work, about a third of the company’s roughly 60 employees took buyouts and left.
On 25 December 2025 Ruby 4.0 was released to mark thirty years since the first public version.
Dead End
The most ambitious attempt to remake Ruby’s implementation was Rubinius. Begun by Evan Phoenix in 2006, it followed the Smalltalk tradition of writing as much of a language as possible in the language itself, on top of a small virtual machine, with the promise that Ruby programmers could read and change their own runtime. Engine Yard, a Rails hosting company, funded full-time work on it from 2007 to 2013, and Rubinius produced one lasting by-product: RubySpec, an executable specification of Ruby’s behavior that other implementations used to test themselves.
Rubinius never became faster than the standard interpreter for most real programs, and it fell behind as Matz’s team changed the language every year. After Engine Yard withdrew its support, the project shrank to a few volunteers; RubySpec was closed by its maintainer in 2014 and revived as ruby/spec. The speed Rubinius had promised came instead from inside the standard implementation, through YARV and then YJIT, developed by the company with the most Ruby code to run.
📚 Sources
- Ruby official site and About Ruby: Matz’s 1999 ruby-talk statement on Perl and Python, happiness quote
- Wikipedia: Ruby (programming language): naming 24 February 1993, Coral, birthstone, 0.95 on 21 December 1995, 1.0 on 25 December 1996, 1.8 August 2003, 2.0, 3.0 and 3x3, JIS and ISO standards, 4.0 on 25 December 2025
- SitePoint, “The History of Ruby”
- Wikipedia: Programming Ruby: the “Pickaxe” nickname, full text online; publication date 15 December 2000 per the Addison-Wesley listing (ISBN 0-201-71089-7)
- Wikipedia: Ruby on Rails: July 2004 release, 1.0 on 13 December 2005, Apple and Leopard, Merb merger, version history, 1.2 million sites, Twitter dispute and Hansson’s reply
- Ruby on Rails official site and The Rails Doctrine
- DHH: Create a blog in 15 minutes with Ruby on Rails (2005 screencast)
- Wikipedia: Heroku and Y Combinator, “Salesforce.com Buys Heroku For $212 Million In Cash”
- Zed Shaw, “Rails Is A Ghetto” (31 December 2007), archived and TechCrunch, “Zed Shaw Puts The Smack Down On The Rails Community” (1 January 2008)
- The Register, “Twitter jilts Ruby for Scala” (1 April 2009) and Kestrel repository
- Twitter Engineering, “Twitter Search is Now 3x Faster” (2011)
- Wikipedia: Yiying Lu: the Fail Whale
- Shopify Engineering, “YJIT: Building a New JIT Compiler for CRuby” and “Ruby 3.2’s YJIT is Production-Ready”
- DHH on X (25 November 2023): Shopify at one million requests per second
- TechCrunch, “Basecamp sees mass employee exodus after CEO bans political discussions” (30 April 2021)
- Wikipedia: Yukihiro Matsumoto
- Wikipedia: Rubinius and Hacker News discussion of Engine Yard ending Rubinius funding (2013)
- Image: Yukihiro Matsumoto (2018).jpg by Christopher Adams (CC BY 2.0), via Wikimedia Commons
- Image: Dave Thomas, 2006 (cropped).jpg by James Davidson (CC BY 2.0), via Wikimedia Commons