Ruby vs. Python (Why Python Won and Ruby Didn’t)

Ruby vs. Python (Why Python Won and Ruby Didn’t)
Table of Contents

In 2006, the TIOBE Index crowned Ruby its Language of the Year for posting the fastest growth rate of anything on the list. Two decades later, it's settled in around #20 - respectable, but a long way down from where it once stood.

Ruby went from "the future of programming" to "wait, people still use that?" within a single career.

This isn't a eulogy, though - stick around, because Ruby is very much alive, just not where the headlines are looking. But if you want to understand why Python ate the developer world's lunch, the real story is a lot more interesting than "Python has more libraries." Let's look at what actually happened, starting with the scoreboard.

The TIOBE numbers

The gap is bigger than most people expect.

#8
Ruby's best-ever TIOBE ranking, hit in May 2016

#20
Ruby's current TIOBE rank (mid-2026)

21.81%
Python's TIOBE share (Jun 2026) - almost 2x language #2

TIOBE founder and CEO Paul Jansen said as much directly in his April 2025 breakdown of the index. His read: Ruby held its own against Python and Perl for years, and even stabilized while Perl declined - but Python's rise changed the math:

"...there is not much room left for Ruby."
- Paul Jansen, TIOBE Founder & CEO, on LinkedIn

One honest caveat: TIOBE measures how often people search for a language's tutorials and docs, not how much code is actually running in production. So don't take any single month's rank too literally. But a trend that holds in the same direction for twenty straight years isn't a measurement error - that part you can trust.

Ruby bet everything on Rails

Ruby's rise and fall tracks almost perfectly with Rails as a category. Between roughly 2005 and 2012, Rails was the framework - Twitter, early Airbnb, and Basecamp all ran on it, and "learn Ruby" basically meant "learn Rails."

Python had web development too. Django launched around the same time as Rails, give or take a year. But web dev was never Python's only job - it already had a decade of scripting, sysadmin tooling, and academic computing under its belt before Rails even existed.

So when the web development lane got crowded - Node.js showed up promising one language for your entire stack, and the JavaScript ecosystem exploded around it - Python just kept doing its other jobs while quietly picking up new ones. Ruby didn't have a second act to fall back on.

The recurring theory

Across developer forums, this argument comes up again and again in slightly different words: Ruby's entire identity got welded to one framework. The moment something better came along in that framework's specific lane, Ruby had nowhere else to retreat to. Python was never betting on a single horse.

Why developers still defend Ruby

Ruby vs Python: DHH on why Ruby is better | Lex Fridman Podcast Clips

If you want to understand why some developers will defend Ruby to the death, you don't need a chart - you need five minutes of Rails creator DHH explaining why Python's __init__ physically pains him. It's a genuinely good argument, and it's worth taking seriously.

Ruby
def initialize(name)
  @name = name
  end

Python
def __init__(self, name):
        self.name = name

Same job - Ruby just skips the punctuation ceremony.

Ruby
user.downgrade unless user.admin?

Python
if not user.is_admin:
        user.downgrade()

The ? on admin? tells the interpreter nothing. It's a note left for the next developer.

Ruby's creator, Yukihiro "Matz" Matsumoto, has said his top design goal was programmer happiness - not raw performance, not parser simplicity, but whether writing the code felt good. DHH's summary of the effect: reading well-written Ruby "reads like poetry." Python, by contrast, was built around the idea that there should ideally be one obvious way to do any given thing - clarity through constraint, rather than clarity through expressiveness.

Neither philosophy is wrong. They're just optimizing for different readers.

Why good syntax wasn't enough

Beautiful syntax is a real competitive advantage. It's just not the biggest one, and here's the actual inflection point: a library, not a framework.

Specifically, NumPy - originally released as "Numeric" and renamed in 2006 - made Python viable for serious numerical computing years before "machine learning" was something people put on a résumé. Everything that came after (SciPy, pandas, scikit-learn, PyTorch) built directly on that foundation. Ruby never had an equivalent, because Ruby wasn't trying to be a numeric-computing language. It was trying to be a joyful web-and-scripting language, and for a good while, it succeeded at exactly that.

There's a neat historical echo here, too: Python's rise partly filled a vacuum that Perl left behind after its own long, unfinished transition to Perl 6 fractured its community. Ruby's story rhymes with that, just with a different cause - not a broken version upgrade, but a niche that got crowded out from under it by better-funded competition.

The short version

Beautiful syntax didn't lose to ugly syntax. A language with one killer app lost to a language that quietly became infrastructure for an entire industry.

Show me the benchmarks

Here's the honest answer to "which one is faster": it depends far more on your framework and workload than on the language's name on the tin.

  • I/O-bound web apps (the bulk of typical backend work): Ruby and Python land roughly in the same neighborhood - your database queries and network calls dominate, not the interpreter.
  • CPU-bound numeric work: Python usually pulls ahead, but that's thanks to native libraries like NumPy doing the heavy lifting in C, not the interpreter itself being faster.

Then there's the benchmark that ruins the tidy narrative. One public head-to-head pitted a simple Ruby web server (Roda) against Python's FastAPI on identical hardware:

Ruby (Roda)~14,900 req/sec
Python (FastAPI)~2,990 req/sec

Source: a single open GitHub benchmark, 4 cores, one specific endpoint. Not a universal ruling on either language - a good reminder that framework and config choices can swing results far more than the language does.

Both ecosystems have also been racing to close their historical performance gaps with JIT compilation: Ruby's YJIT (built by Shopify) targets 3x the speed of Ruby 2, while Python leans on projects like PyPy for similar gains.

Pro tip

Stop asking "which language is faster." Ask "is this fast enough for what I'm building," then benchmark your actual stack - not a blog post's stack. Including this one.

Ruby isn't dead, it's just not trending

"Declining on a search-engine index" and "irrelevant" are two very different things. Here's what's still running on Ruby, quietly, at scale:

Shopify

Runs a massive share of global e-commerce on Rails, and actively funds Ruby's own performance work (including YJIT).

GitHub & GitLab

Two of the most consequential platforms in software development are themselves substantially Ruby and Rails codebases.

1M+ GitHub users

An academic study analyzing Ruby's ecosystem found over a million developers still active on GitHub, even as Stack Overflow question volume trends downward.

The job market paradox

Python has far more open roles overall, but experienced Rails developers are scarce enough that freelance rates commonly run $100–250+/hour in 2026.

Worth noting: a mature ecosystem asking fewer questions on Stack Overflow can just mean fewer new problems left to solve, not fewer developers solving them. Ruby is less "dead language" and more "city that stopped issuing press releases." Still very much occupied.

Which one should you actually learn?

Honest, no-hedging version:

Pick Ruby if…

  • You're shipping a startup MVP fast, solo or on a small team
  • You're joining (or building) a Rails shop
  • You genuinely value expressive, readable-as-prose syntax
  • You're maintaining an existing Rails codebase

Pick Python if…

  • You want AI, ML, or data science on your résumé
  • You want the largest job market and community by far
  • You need one language across scripting, backend, and data
  • You're learning to code and want the most tutorials available

On that last beginner point: most learning resources and community size favor Python, but that's an ecosystem advantage, not a syntax one - Ruby is arguably just as readable for a first-timer.

Frequently asked questions

Is Python better than Ruby?

Depends what "better" means. For raw popularity, tooling, job openings, and range of use cases - AI, data, scripting, web - Python wins clearly in 2026. For a solo developer or small team who wants a joyful, expressive syntax and a fast path to a web MVP, Ruby (via Rails) can still be the better fit for that specific job. It's less "better language" and more "better fit."

Is Ruby still relevant in 2026?

Yes, at scale, just quietly. Shopify, GitHub, and GitLab all lean heavily on Ruby and Rails in production, and one academic estimate puts active Ruby developers on GitHub above a million. It's no longer the growth language it was in 2010, but "not growing" and "irrelevant" aren't the same claim.

Is Ruby faster than Python?

It depends heavily on workload and framework, not the language's name. For I/O-bound web apps, the two are roughly comparable in practice - one public benchmark even had a Ruby web server outperforming a Python one on a simple endpoint. For CPU-heavy numeric work, Python usually pulls ahead, but that's due to native libraries like NumPy, not a faster interpreter. Benchmark your actual use case before trusting either language's reputation.

Does NASA use Ruby?

A little, yes. NASA has open-sourced small Ruby tools - including testing utilities for Fortran code - and has documented building internal Ruby on Rails applications, including single sign-on tooling. It's a minor player there, though: Python is NASA's much heavier hitter, used for everything from Mars rover data processing to Hubble and James Webb telescope data analysis.

Whichever language you pick, ship with confidence

Language debates are fun, but the real test happens after you hit deploy. Ruby's flexible syntax and Python's dynamic typing are both wonderful right up until one of them lets a bug slip into production that only shows up for one specific user, on one specific browser, at 2am. Rollbar catches those errors as they happen, tells you exactly which release introduced them, and groups the noise so you're not drowning in fifty copies of the same alert.

Want to go a step further? Rollbar Resolve (in alpha now) picks up where monitoring leaves off - it reviews your codebase, figures out the root cause, and opens a tested pull request with a fix. You just review and merge.



Related Resources

Build with confidence. Release with clarity.

Rollbar helps you track what breaks, understand why, and improve what comes next.

5K free events per month, forever
14-day full feature trial
Easy and quick installation
Get started in minutes

Plans starting at $0. Take off with our 14-day full feature Free Trial.