---
title: "Ruby"
description: "Ruby or Ruby on Rails"
url: "https://swe.quest/tags/ruby?per=96"
---

# Ruby

Topic in Languages: Ruby or Ruby on Rails

By difficulty: [Easy](https://swe.quest/tags/ruby.md?difficulty=easy) · [Medium](https://swe.quest/tags/ruby.md?difficulty=medium) · [Hard](https://swe.quest/tags/ruby.md?difficulty=hard)

Posts 1–85 of 85, page 1 of 1, newest first.

## 2026-11-24

- [Type errors cost our coding agents under 1% of their time](https://swe.quest/articles/type-errors-cost-our-coding-agents-under-1-of-their-time-fa7c6019d6e8a188.md): Evil Martians · 2026-11-24 · Medium · 27 min read · AI for coding, Evaluation, Type systems, TypeScript, Ruby
  Static typing does not measurably help coding agents finish more tasks.

## 2026-11-20

- [How Cloudflare WAF protects against ruby2shell (CVE-2026-132825)](https://swe.quest/articles/how-cloudflare-waf-protects-against-ruby2shell-cve-2026-132825-7727483822350470.md): Cloudflare · 2026-11-20 · Medium · 6 min read · Vulnerability research, Ruby, Application security, Memory safety
  ruby2shell (CVE-2026-132825) is a heap buffer overflow in Ruby's string case conversion: in 14 legacy single-byte encodings, uppercasing the German ß writes two bytes (SS) but reserves room for one, so 21 sharp s characters overflow by a byte, with proofs of concept reaching remote code execution.
- [How I shipped 39 PRs to prod as a non-developer](https://swe.quest/articles/how-i-shipped-39-prs-to-prod-as-a-non-developer-c158dc7f5a4bb51e.md): 8th Light · 2026-11-20 · Medium · 11 min read · AI for coding, Code review, Ruby, Engineering management, Product engineering
  A non-developer product manager shipped 39 production pull requests to a Rails/Hotwire client codebase using Claude Code and the team's Research-Plan-Implement agentic process.
- [Ruby2Shell (CVE-2026-132825): find vulnerable Ruby across your repos](https://swe.quest/articles/ruby2shell-cve-2026-132825-find-vulnerable-ruby-across-your-repos-943808a4d97a4f48.md): Sourcegraph · 2026-11-20 · Medium · 5 min read · Ruby, Vulnerability research, Supply chain security, Developer tools
  Ruby2Shell (CVE-2026-132825) is a critical heap overflow in Ruby's string case conversion that researchers say default Rails and classic Sinatra apps expose without authentication, with remote code execution proofs of concept known.

## 2026-11-19

- [Building PlanetScale with Insights Agent](https://swe.quest/articles/building-planetscale-with-insights-agent-b70b35e12242702e.md): PlanetScale · 2026-11-19 · Medium · 5 min read · MySQL, Performance engineering, AI agents, Ruby, Databases
  PlanetScale ran its Insights Agent, which finds costly queries via Query Insights and opens fix PRs, against its own Rails API on MySQL.

## 2026-11-11

- [Building Uscreen’s remote, multi-tenant MCP server inside a Rails app](https://swe.quest/articles/building-uscreen-s-remote-multi-tenant-mcp-server-inside-a-rails-app-1185c6f769ffbf8b.md): Evil Martians · 2026-11-11 · Medium · 14 min read · AI agents, Ruby, Multi-tenancy, Identity & auth, API design
  Evil Martians moved Uscreen's local, NPM-installed MCP server into Uscreen's Rails monolith, so creators connect an AI client by pasting a URL, signing in via OAuth, and approving access.

## 2026-11-03

- [The Agents on Rails Files: enter lemans, a Ruby harness for fair agent races](https://swe.quest/articles/the-agents-on-rails-files-enter-lemans-a-ruby-harness-for-fair-agent-races-67f1e215509b634c.md): Evil Martians · 2026-11-03 · Medium · 16 min read · Evaluation, AI agents, Ruby, Sandboxing & isolation, LLMs
  lemans is an open source Ruby harness built for the Rails Foundation's coding-agent benchmark.

## 2026-10-21

- [The Agents on Rails Files: designing black-box evals for coding agents](https://swe.quest/articles/the-agents-on-rails-files-designing-black-box-evals-for-coding-agents-3e90939da666e071.md): Evil Martians · 2026-10-21 · Medium · 16 min read · Evaluation, Testing, AI for coding, Ruby
  Black-box, browser-driven verification lets coding-agent evals grade apps whose code organization and UI the agent chooses freely, as in Stage 3 of the Rails Foundation's Agents on Rails benchmark.

## 2026-07-29

- [Building an agentic harness that outlasts the model](https://swe.quest/articles/building-an-agentic-harness-that-outlasts-the-model-75504578038e6cc5.md): Shopify Engineering · 2026-07-29 · Medium · 8 min read · AI agents, Application security, Vulnerability research, LLMs, Ruby
  Shopify's AppSec team built Dispatch, a Ruby-orchestrated multi-agent harness that partitions codebases, runs parallel category-specific Hunter agents, verifies candidates with tests written by a different model inside each app's existing test suite, and opens draft fix PRs.

## 2026-07-10

- [One Driver, One Format, Every Language: ADBC](https://swe.quest/articles/one-driver-one-format-every-language-adbc-cd7930c89ffe6678.md): ClickHouse · 2026-07-10 · Medium · 12 min read · Analytics & OLAP, Databases, Ruby, Rust, Data pipelines
  ClickHouse released an official ADBC (Arrow Database Connectivity) driver, written in Rust, that returns query results as Apache Arrow end to end with no row-oriented conversion or staging step.

## 2026-07-07

- [Spec-tacular: ways to think about writing expressive RSpec](https://swe.quest/articles/spec-tacular-ways-to-think-about-writing-expressive-rspec-678c66c3f853b737.md): FreeAgent Engineering · 2026-07-07 · Medium · 6 min read · Testing, Ruby
  Structuring RSpec like a scientific experiment, with shared setup as control variables, \`subject\` as the dependent variable and \`let\` inside contexts as the independent variable, makes specs read as documentation of a class's interface.

## 2026-06-18

- [Profiling Performance Bottlenecks in Production](https://swe.quest/articles/profiling-performance-bottlenecks-in-production-057c5006f3673d4b.md): Doximity Technology · 2026-06-18 · Medium · 8 min read · Ruby, Performance engineering, Debugging, Observability
  A slow Sidekiq background job at Doximity was traced with the Vernier sampling profiler to a Redis fetch memoized on a per-record builder instance.

## 2026-03-12

- [Shopify’s journey to faster breadth-first GraphQL execution](https://swe.quest/articles/shopify-s-journey-to-faster-breadth-first-graphql-execution-83f0f58b8c4dabd1.md): Shopify Engineering · 2026-03-12 · Hard · 14 min read · GraphQL, Performance engineering, Ruby, Query engines
  Shopify built GraphQL Cardinal, a breadth-first GraphQL execution engine that calls each field resolver once with the full set of objects at that level instead of once per object.

## 2026-01-22

- [Your Dependencies Don’t Care About Your FIPS Configuration](https://swe.quest/articles/your-dependencies-don-t-care-about-your-fips-configuration-c719fbf5e05d7dd0.md): Docker · 2026-01-22 · Medium · 5 min read · Supply chain security, Cryptography, Containers, Ruby
  FIPS-enabled container images can still run non-FIPS crypto because prebuilt native dependencies bring their own crypto linkage.

## 2026-01-08

- [Persisting nested form attribute indexes through Turbo updates](https://swe.quest/articles/persisting-nested-form-attribute-indexes-through-turbo-updates-0b3175a90493222c.md): FreeAgent Engineering · 2026-01-08 · Medium · 5 min read · Ruby, Frontend
  When a Turbo Stream replaces part of a Rails nested form, the replacement fields must keep the same attribute index as their siblings, which can be passed via the form builder's \`index\` property as a URL parameter and hidden field.

## 2025-11-05

- [Upgrade to Puma 7 and Unlock the Power of Fair Scheduled Keep-alive](https://swe.quest/articles/upgrade-to-puma-7-and-unlock-the-power-of-fair-scheduled-keep-alive-798a2f5419631b82.md): Heroku Engineering · 2025-11-05 · Medium · 11 min read · Ruby, Concurrency, Performance engineering, Networking
  Puma 6 and earlier let a single keep-alive connection monopolize a thread for up to 10 requests via the "fast inline" loop originally built for HTTP pipelining, so under overload about one in ten requests waited roughly 10x longer while later keep-alive requests cut the line.

## 2025-11-04

- [Learn How to Lower Heroku Dyno Latency through Persistent Connections (Keep-alive)](https://swe.quest/articles/learn-how-to-lower-heroku-dyno-latency-through-persistent-connections-keep-alive-3816d278b532e549.md): Heroku Engineering · 2025-11-04 · Medium · 6 min read · Networking, Performance engineering, Ruby, Cloud platforms
  HTTP keep-alive connections cut latency by reusing TCP connections, so repeat requests skip the handshake and TCP slow start and run at full bandwidth.

## 2025-10-23

- [Visibility at scale: How Figma detects sensitive data exposure](https://swe.quest/articles/visibility-at-scale-how-figma-detects-sensitive-data-exposure-a9fbf43af9718cbb.md): Figma · 2025-10-23 · Medium · 11 min read · Application security, Identity & auth, Ruby, Privacy, Observability
  Figma built Response Sampling, a detection layer that randomly samples outbound API responses and checks them for sensitive data the requesting user shouldn't see.

## 2025-10-17

- [A refreshing take: using serverside rendering to reduce fragile DOM state](https://swe.quest/articles/a-refreshing-take-using-serverside-rendering-to-reduce-fragile-dom-state-949880494b413aac.md): FreeAgent Engineering · 2025-10-17 · Medium · 8 min read · Frontend, Ruby, Real-time systems
  Turbo's \`refresh\` stream action, unlike the original DOM-manipulating actions, exists to let servers broadcast "re-fetch this page" over Action Cable, with idiomorph morphing applying only the changed elements.

## 2025-06-18

- [Introducing Roast: Structured AI workflows made easy](https://swe.quest/articles/introducing-roast-structured-ai-workflows-made-easy-0fdb158278ceca92.md): Shopify Engineering · 2025-06-18 · Easy · 9 min read · AI agents, AI for coding, Developer tools, Ruby, Testing
  Roast is Shopify's open-source, Ruby-based CLI framework for orchestrating structured AI workflows.

## 2025-05-13

- [GitHub Issues search now supports nested queries and boolean operators: Here’s how we (re)built it](https://swe.quest/articles/github-issues-search-now-supports-nested-queries-and-boolean-operators-here-s-2684ca9cc7ff5489.md): GitHub Engineering · 2025-05-13 · Medium · 9 min read · Search, Ruby, Deployment, Refactoring & migrations, Testing
  GitHub rebuilt Issues search to support AND/OR operators and nested parentheses by replacing the flat-list parser with a PEG grammar (via the Ruby parslet library) that produces an abstract syntax tree.

## 2025-04-15

- [Announcing Ruby Gem analytics powered by ClickHouse and Ruby Central](https://swe.quest/articles/announcing-ruby-gem-analytics-powered-by-clickhouse-and-ruby-central-7ec050b11d121632.md): ClickHouse · 2025-04-15 · Medium · 18 min read · Analytics & OLAP, Data pipelines, Ruby, Open source
  ClickHouse and Ruby Central now offer free RubyGems download analytics via sql.clickhouse.com, covering over 180 billion download rows since 2017 plus daily aggregates and weekly metadata dumps (dependencies, versions, attestations).

## 2025-02-12

- [How GitHub uses CodeQL to secure GitHub](https://swe.quest/articles/how-github-uses-codeql-to-secure-github-3ead357c38ddce28.md): GitHub Engineering · 2025-02-12 · Medium · 14 min read · Static analysis, Application security, Ruby, CI/CD
  GitHub's Product Security Engineering team runs CodeQL across more than 10,000 repositories, mostly with default setup and the security-extended suites.

## 2025-02-05

- [How To Maintain Seed Files (And Why You May Not Want To Do It)](https://swe.quest/articles/how-to-maintain-seed-files-and-why-you-may-not-want-to-do-it-8f196f8d27fea45b.md): Neon · 2025-02-05 · Medium · 7 min read · Databases, Testing, PostgreSQL, Ruby, Developer productivity
  Seed files should be versioned alongside schema changes, executed automatically in pipelines, split by environment, made incremental like migrations, and written to be idempotent, with Ruby/Rails and Docker Compose examples showing each practice.

## 2024-12-18

- [Turso Adds Ruby on Rails Support](https://swe.quest/articles/turso-adds-ruby-on-rails-support-80c171904d4e2326.md): Turso · 2024-12-18 · Medium · 3 min read · Ruby, SQLite, Databases
  Turso has released a technical preview of libsql\_activerecord, an ActiveRecord adapter that connects Rails applications to Turso/libSQL databases.

## 2024-11-21

- [Pumas, Routers & Keepalives—Oh my!](https://swe.quest/articles/pumas-routers-keepalives-oh-my-4b676798ea4106ef.md): Heroku Engineering · 2024-11-21 · Medium · 17 min read · Debugging, Performance engineering, Ruby, Load balancing, Networking
  Elevated tail latency seen by some Puma apps after enabling Heroku Router 2.0 turned out to be a Puma bug, not a router problem.

## 2024-11-01

- [How we built a Ruby library that saves 50% in testing time](https://swe.quest/articles/how-we-built-a-ruby-library-that-saves-50-in-testing-time-128208a842ec0eb3.md): Datadog Engineering · 2024-11-01 · Hard · 12 min read · Ruby, Testing, Performance engineering, Runtimes & VMs, CI/CD
  Datadog built a Ruby test impact analysis library for its Intelligent Test Runner that maps each test to the source files it executes, so tests unrelated to a commit's changed files can be skipped, cutting testing time roughly in half.

## 2024-07-23

- [How we improved availability through iterative simplification](https://swe.quest/articles/how-we-improved-availability-through-iterative-simplification-1aa63e0def5687e6.md): GitHub Engineering · 2024-07-23 · Medium · 6 min read · Performance engineering, MySQL, Ruby, Observability, Deployment
  GitHub cut timeouts in its Rails monolith with small, measured changes found through Datadog metrics, Splunk logs and custom MySQL slow-query monitors.

## 2024-07-02

- [Database testing with fixtures and seeding](https://swe.quest/articles/database-testing-with-fixtures-and-seeding-c9148078cf139feb.md): Neon · 2024-07-02 · Medium · 9 min read · Testing, Databases, Python, Ruby
  Seeding and fixtures solve different problems when populating databases for testing.

## 2024-06-11

- [How we improved push processing on GitHub](https://swe.quest/articles/how-we-improved-push-processing-on-github-ee01af72cf149679.md): GitHub Engineering · 2024-06-11 · Medium · 7 min read · Event-driven architecture, Queues & messaging, Resilience, Ruby, Scaling
  GitHub replaced RepositoryPushJob, a single sequential background job that ran over 60 push-handling tasks from 20 services, with a Kafka push event fanned out to roughly 16 independently owned, parallel jobs.

## 2024-03-13

- [How we built a custom permissions DSL at Figma](https://swe.quest/articles/how-we-built-a-custom-permissions-dsl-at-figma-b86982742becc83a.md): Figma · 2024-03-13 · Medium · 24 min read · Identity & auth, Language design, System design, Ruby, TypeScript
  Figma replaced a sprawling Ruby \`has\_access?\` permissions function with a custom, JSON-serializable permissions DSL and a cross-platform policy engine, inspired by AWS IAM policies.

## 2024-02-07

- [A Packwerk Retrospective](https://swe.quest/articles/a-packwerk-retrospective-b9d1167fd6021459.md): Shopify Engineering · 2024-02-07 · Medium · 14 min read · Ruby, Static analysis, Refactoring & migrations, System design
  Packwerk, Shopify's static analysis gem for enforcing package boundaries in Rails monoliths via constant references, works best as a dependency-graph tool rather than an API-privacy tool, which is why privacy checks were removed in 3.0.

## 2024-01-29

- [Getting started with Ruby on Rails and Postgres on Supabase](https://swe.quest/articles/getting-started-with-ruby-on-rails-and-postgres-on-supabase-03d6ca4747754aea.md): Supabase · 2024-01-29 · Medium · 3 min read · Ruby, PostgreSQL, Deployment
  A Rails app can be wired to a Supabase-hosted Postgres database by scaffolding with \`rails new -d=postgresql\` and supplying the Supabase pooler connection URI through the \`DATABASE\_URL\` environment variable.

## 2024-01-17

- [Horizontally scaling the Rails backend of Shop app with Vitess](https://swe.quest/articles/horizontally-scaling-the-rails-backend-of-shop-app-with-vitess-03c7b2da20f98ec3.md): Shopify Engineering · 2024-01-17 · Medium · 27 min read · MySQL, Distributed databases, Ruby, Scaling, Schema migrations
  Shop app outgrew a single MySQL database despite federating tables across databases, so the team moved its Rails backend to Vitess, sharding user-owned tables by user\_id into a "users" keyspace and keeping the rest in an unsharded "global" keyspace.

## 2023-12-19

- [How we organize and get things done with SERVICEOWNERS](https://swe.quest/articles/how-we-organize-and-get-things-done-with-serviceowners-2afb066a8015a9a4.md): GitHub Engineering · 2023-12-19 · Medium · 4 min read · Developer productivity, Engineering management, Ruby, SRE
  GitHub added a service layer between code and teams in its 4.2M-line Rails monolith: a SERVICEOWNERS file maps glob patterns, directories and files to named services, and a service-mappings.yaml ties each service to teams, managers, chat channels and tier ratings.

## 2023-10-18

- [Introducing Ruvy](https://swe.quest/articles/introducing-ruvy-a780cb3b4891bef0.md): Shopify Engineering · 2023-10-18 · Medium · 5 min read · WebAssembly, Ruby, Performance engineering, Open source
  Ruvy is an open-source toolchain built on ruby.wasm that compiles Ruby scripts into WebAssembly modules, pre-initializing the Ruby VM and preloaded Ruby files at build time instead of at startup.

## 2023-04-06

- [Building GitHub with Ruby and Rails](https://swe.quest/articles/building-github-with-ruby-and-rails-99851966c067c871.md): GitHub Engineering · 2023-04-06 · Medium · 5 min read · Ruby, Refactoring & migrations, CI/CD, Deployment, Open source
  GitHub's ~2M-line Rails monolith upgrades to the latest Rails main-branch commit every week via a scheduled GitHub Actions workflow that opens an automated PR, runs all builds, and ships the next day.
- [Adventures in Garbage Collection: Improving GC Performance in our Massive Monolith](https://swe.quest/articles/adventures-in-garbage-collection-improving-gc-performance-in-our-massive-7c8cc3e83e915743.md): Shopify Engineering · 2023-04-06 · Hard · 13 min read · Memory management, Ruby, Performance engineering, Runtimes & VMs
  Shopify cut Ruby garbage-collection tail latency in its monolith by finding why major GCs were triggered, via GC.latest\_gc\_info(:major\_by), and removing each cause in turn.

## 2023-03-24

- [Supporting Passkeys in Shop's Authentication Flows](https://swe.quest/articles/supporting-passkeys-in-shop-s-authentication-flows-83c5b8b12531ab5a.md): Shopify Engineering · 2023-03-24 · Medium · 6 min read · Identity & auth, Ruby, E-commerce
  Shop added passkeys (WebAuthn public-key credentials) to Shop Pay and the Shop app as a phishing-resistant alternative to email/SMS verification codes, using the webauthn-ruby gem in their Rails backend and serving the flow from an iframe so it works on merchant storefronts.

## 2023-02-24

- [Improving the Developer Experience with the Ruby LSP](https://swe.quest/articles/improving-the-developer-experience-with-the-ruby-lsp-7b63921832eb2226.md): Shopify Engineering · 2023-02-24 · Medium · 16 min read · Ruby, Developer tools, Developer productivity
  Ruby LSP is a pure-Ruby language server from Shopify that provides editor features for Ruby without type checking or type annotations, aiming for performance and stability on large codebases like Shopify's Core monolith and leaning toward Rails-specific features.

## 2023-02-21

- [The Case Against Monkey Patching, From a Rails Core Team Member](https://swe.quest/articles/the-case-against-monkey-patching-from-a-rails-core-team-member-b0bd43ce3a761b2b.md): Shopify Engineering · 2023-02-21 · Medium · 14 min read · Ruby, Refactoring & migrations, Open source
  Monkey patching Rails and other gems is brittle and should be avoided.

## 2023-01-26

- [How to self-host Mastodon](https://swe.quest/articles/how-to-self-host-mastodon-a9419721506c8665.md): Neon · 2023-01-26 · Medium · 8 min read · Deployment, PostgreSQL, Ruby, Cloud platforms
  Self-hosting a Mastodon instance on Fly.io comes down to a starter repo, a Dockerfile and two Fly config files: one runs the database setup, the other deploys the app.

## 2023-01-17

- [Ruby 3.2’s YJIT is Production-Ready](https://swe.quest/articles/ruby-3-2-s-yjit-is-production-ready-05f17a68a56ea05c.md): Shopify Engineering · 2023-01-17 · Easy · 10 min read · Ruby, Compilers, Runtimes & VMs, Performance engineering, Rust
  YJIT, Shopify's JIT compiler for CRuby, became production-ready in Ruby 3.2 after a port from C99 to Rust and a cut in memory overhead to about a third of Ruby 3.1 levels.

## 2023-01-05

- [Reliving Your Happiest HTTP Interactions with Ruby’s VCR Gem](https://swe.quest/articles/reliving-your-happiest-http-interactions-with-ruby-s-vcr-gem-875b5fd62be42b02.md): Shopify Engineering · 2023-01-05 · Medium · 8 min read · Ruby, Testing
  VCR records live HTTP interactions into YAML "cassettes" and replays them in Ruby tests, giving accurate fixtures for complex, slow, or poorly understood APIs where hand-built Webmock stubs drift from real behavior.

## 2022-12-25

- [Optimizing Ruby’s Memory Layout: Variable Width Allocation](https://swe.quest/articles/optimizing-ruby-s-memory-layout-variable-width-allocation-7db49cee151f4d44.md): Shopify Engineering · 2022-12-25 · Hard · 13 min read · Memory management, Ruby, Runtimes & VMs, Performance engineering
  Ruby 3.2's Variable Width Allocation replaces CRuby's single 40-byte RVALUE slot with five size pools (40, 80, 160, 320 and 640 bytes) so classes, strings, arrays and objects can store their data adjacent to the object instead of in separate malloc'd memory.

## 2022-12-22

- [Year in Review 2022: Tenderlove's Ruby and Rails Reflections and Predictions](https://swe.quest/articles/year-in-review-2022-tenderlove-s-ruby-and-rails-reflections-and-predictions-d873d71ac3e91545.md): Shopify Engineering · 2022-12-22 · Easy · 8 min read · Ruby, Runtimes & VMs, Memory management, Developer tools, Compilers
  Ruby's 2022 highlights include YJIT's rewrite in Rust and its new ARM support, so \`ruby --yjit\` now runs on Apple Silicon development machines as well as production.

## 2022-11-15

- [Caching Without Marshal Part 2: The Path to MessagePack](https://swe.quest/articles/caching-without-marshal-part-2-the-path-to-messagepack-dde2d14188f0b673.md): Shopify Engineering · 2022-11-15 · Medium · 17 min read · Ruby, Caching, Refactoring & migrations
  Shopify replaced Ruby's Marshal with MessagePack as the Rails cache format for its core monolith so that code changes would stop breaking cached payloads on deploy.

## 2022-11-11

- [Caching Without Marshal Part 1: Marshal from the Inside Out](https://swe.quest/articles/caching-without-marshal-part-1-marshal-from-the-inside-out-57f413ca18174072.md): Shopify Engineering · 2022-11-11 · Medium · 11 min read · Ruby, Caching, Runtimes & VMs
  Ruby's Marshal serializes an object's full class graph into cache entries, so a refactor that renamed classes caused old and new code to choke on each other's cached beta-flag objects mid-deploy and triggered an incident at Shopify.

## 2022-11-03

- [How GitHub converts previously encrypted and unencrypted columns to ActiveRecord encrypted columns](https://swe.quest/articles/how-github-converts-previously-encrypted-and-unencrypted-columns-to-7a6a32eb2ff23c82.md): GitHub Engineering · 2022-11-03 · Medium · 7 min read · Ruby, Cryptography, Schema migrations, Security, Deployment
  GitHub migrated plaintext columns and columns encrypted with a deprecated internal library to ActiveRecord::Encryption.

## 2022-10-26

- [Why and how GitHub encrypts sensitive database columns using ActiveRecord::Encryption](https://swe.quest/articles/why-and-how-github-encrypts-sensitive-database-columns-using-activerecord-4abc36e2a491f04c.md): GitHub Engineering · 2022-10-26 · Medium · 5 min read · Cryptography, Ruby, Databases, Security
  GitHub replaced its internal Encrypted Attributes library with Rails' ActiveRecord::Encryption so developers can encrypt a sensitive column with a single familiar \`encrypts\` call, without hand-provisioning a key per column.

## 2022-10-19

- [Finding Relationships Between Ruby’s Top 100 Packages and Their Dependencies](https://swe.quest/articles/finding-relationships-between-ruby-s-top-100-packages-and-their-dependencies-e53722c1985f09a2.md): Shopify Engineering · 2022-10-19 · Medium · 9 min read · Supply chain security, Ruby, Identity & auth, Algorithms
  RubyGems' MFA requirement for gems over 180M downloads leaves a loophole: some big gems depend on small gems below the threshold, so compromising a small gem's owner account reaches big gems' users.

## 2022-09-01

- [Focus On Behavior, Not State, for a More Maintainable Codebase](https://swe.quest/articles/focus-on-behavior-not-state-for-a-more-maintainable-codebase-d186fd1356391a16.md): Shopify Engineering · 2022-09-01 · Medium · 9 min read · Refactoring & migrations, Ruby, E-commerce, System design
  When adding pre-orders and try-before-you-buy to Shopify's Purchase Options APIs, code that equated "has a selling plan" with "is a subscription" forced repeated refactors.

## 2022-08-19

- [Migrating From Heroku To Railway](https://swe.quest/articles/migrating-from-heroku-to-railway-dbd89b10c75a9d07.md): Railway · 2022-08-19 · Medium · 7 min read · Deployment, Cloud platforms, Ruby
  Moving a Heroku app to Railway comes down to three steps: deploy from a GitHub repo, import Heroku config vars, and add Postgres and Redis as separate database services.

## 2022-08-11

- [When is JIT Faster Than A Compiler?](https://swe.quest/articles/when-is-jit-faster-than-a-compiler-a0b7c41444704d7c.md): Shopify Engineering · 2022-08-11 · Easy · 7 min read · Compilers, Runtimes & VMs, Ruby, Performance engineering
  JITs can beat ahead-of-time compilers for highly dynamic languages like Ruby because they can compile code under speculative assumptions, such as that Integer#+ hasn't been redefined, and throw that code away (de-optimize) when an assumption breaks.

## 2022-07-28

- [10 Tips for Building Resilient Payment Systems](https://swe.quest/articles/10-tips-for-building-resilient-payment-systems-94c9ade99576742c.md): Shopify Engineering · 2022-07-28 · Medium · 13 min read · Payments & fintech, Resilience, Observability, Incidents & postmortems, Ruby
  Ten lessons from Shopify's payment infrastructure for keeping payment systems reliable at scale.

## 2022-06-15

- [Making Open Source Safer for Everyone with Shopify’s Bug Bounty Program](https://swe.quest/articles/making-open-source-safer-for-everyone-with-shopify-s-bug-bounty-program-48c56c4f3d09ee13.md): Shopify Engineering · 2022-06-15 · Medium · 5 min read · Application security, Ruby, Open source
  A Shopify bug bounty report showed that a leaked Rails development secret could be escalated to remote code execution because ActiveSupport's MessageEncryptor deserialized data with Marshal by default.

## 2022-05-31

- [To Thread or Not to Thread: An In-Depth Look at Ruby’s Execution Models](https://swe.quest/articles/to-thread-or-not-to-thread-an-in-depth-look-at-ruby-s-execution-models-18ca691643d5cc44.md): Shopify Engineering · 2022-05-31 · Medium · 15 min read · Ruby, Concurrency, Memory management, Performance engineering, Runtimes & VMs
  Threaded Ruby servers like Puma and Sidekiq save memory over forking servers, but the gap is smaller than RSS suggests once copy-on-write sharing is measured properly with PSS and /proc/$PID/smaps\_rollup.

## 2022-05-26

- [Implementing Equality in Ruby](https://swe.quest/articles/implementing-equality-in-ruby-f99e6a9b20284d2f.md): Shopify Engineering · 2022-05-26 · Medium · 18 min read · Ruby, Language design
  Ruby distinguishes several forms of equality (#==, #equal?, #eql?, #hash, #===), and each needs its own correct implementation in custom classes.

## 2022-05-23

- [Migrate a Rails App from Heroku to Render](https://swe.quest/articles/migrate-a-rails-app-from-heroku-to-render-a8a375d8766a19ae.md): Render · 2022-05-23 · Medium · 8 min read · Ruby, Infrastructure as code, Deployment, Cloud platforms
  Migrating the open-source git-scm.org Rails app from Heroku to Render means mapping Heroku concepts (web/worker processes, dynos, Heroku Postgres/Redis, Scheduler, config vars) to Render equivalents and codifying the whole stack in a render.yaml Blueprint.

## 2022-05-13

- [Maestro: The Orchestration Language Powering Shopify Flow](https://swe.quest/articles/maestro-the-orchestration-language-powering-shopify-flow-a032ef3290783e5a.md): Shopify Engineering · 2022-05-13 · Medium · 12 min read · Language design, Static analysis, Scheduling, Resilience, Ruby
  Shopify rebuilt Flow around Maestro, a domain-specific orchestration language that decouples the merchant-facing visual editor from a horizontally scalable execution engine.

## 2022-05-11

- [Our Experience Porting the YJIT Ruby Compiler to Rust](https://swe.quest/articles/our-experience-porting-the-yjit-ruby-compiler-to-rust-221d770c36dd7d35.md): Shopify Engineering · 2022-05-11 · Medium · 16 min read · Rust, Compilers, Ruby, Refactoring & migrations, C & C++
  Shopify's YJIT team ported the CRuby JIT compiler from about 11,000 lines of C99 to Rust because C's lack of modules, generics, containers and safe macros made a growing compiler hard to manage.

## 2022-04-22

- [Building a Business System Integration and Automation Platform at Shopify](https://swe.quest/articles/building-a-business-system-integration-and-automation-platform-at-shopify-ca92d2227e71ff9f.md): Shopify Engineering · 2022-04-22 · Medium · 11 min read · Ruby, System design, API design, Testing
  Shopify replaced Mulesoft with an in-house Ruby on Rails platform for integrating internal business systems such as Salesforce, Airtable and Netsuite, because the proprietary JVM/XML tool sat outside Shopify's stack and couldn't easily reach internal services like Kafka.

## 2022-04-21

- [Improving Git push times through faster server side hooks](https://swe.quest/articles/improving-git-push-times-through-faster-server-side-hooks-21ad6ccb34bf4962.md): GitHub Engineering · 2022-04-21 · Medium · 5 min read · Performance engineering, Version control, Go, Ruby, Refactoring & migrations
  GitHub cut pre-receive hook execution time on every Git push from about 880ms median to 10ms, dropping P99 by 95%, by rewriting the hooks from Ruby into its Go Git service.

## 2022-04-14

- [Code Ranges: A Deeper Look at Ruby Strings](https://swe.quest/articles/code-ranges-a-deeper-look-at-ruby-strings-b87e06d5cb44fa84.md): Shopify Engineering · 2022-04-14 · Hard · 14 min read · Ruby, Runtimes & VMs, Data structures, Performance engineering
  Ruby strings are mutable and encoding-aware across 100+ encodings, so runtimes cache a per-string "code range" (UNKNOWN, 7BIT, VALID, BROKEN) to avoid repeated O(n) validity scans.

## 2022-04-11

- [Performance at GitHub: deferring stats with rack.after\_reply](https://swe.quest/articles/performance-at-github-deferring-stats-with-rack-after-reply-fed8f334f87dc4fe.md): GitHub Engineering · 2022-04-11 · Medium · 3 min read · Ruby, Performance engineering, Observability
  GitHub cut 30ms at p50 and 50ms+ at p99 from every request by buffering statsd metrics during a request and flushing them in one batch through \`rack.after\_reply\`, a hook that runs callables after the full response reaches the client.

## 2022-03-10

- [After the Refactor: A Path to Faster Rendering with Liquid-C](https://swe.quest/articles/after-the-refactor-a-path-to-faster-rendering-with-liquid-c-69e5ad9480eaeead.md): Shopify Engineering · 2022-03-10 · Medium · 4 min read · Runtimes & VMs, Compilers, Ruby, C & C++, Refactoring & migrations
  Liquid-C's bytecode VM was refactored to replace its sequential constant pointer with per-instruction indexes into the constants array, so the instruction pointer can jump freely without recomputing constant offsets.

## 2022-02-18

- [Changing a polymorphic\_type in Rails](https://swe.quest/articles/changing-a-polymorphic-type-in-rails-8b5924e77ba397de.md): Shopify Engineering · 2022-02-18 · Medium · 7 min read · Ruby, Refactoring & migrations, Schema migrations, Databases
  Rails stores the parent's class name in a polymorphic association's type column, so moving models into a new namespace (e.g. Car to Garage::Car) leaves mixed values like "Car" and "Garage::Car" and breaks lookups in both directions.

## 2022-01-27

- [How We Fixed the Dependency Confusion Vulnerability in Over 600 Ruby Applications](https://swe.quest/articles/how-we-fixed-the-dependency-confusion-vulnerability-in-over-600-ruby-14f9a0a0836510b2.md): Shopify Engineering · 2022-01-27 · Medium · 9 min read · Supply chain security, Ruby, Refactoring & migrations, CI/CD
  Shopify closed a dependency confusion hole across roughly 600 Ruby applications by migrating each \`Gemfile.lock\` to Bundler's newer format, which pins every gem to an explicit source.

## 2022-01-19

- [The Adventures of Rendezvous in Heroku’s New Architecture](https://swe.quest/articles/the-adventures-of-rendezvous-in-heroku-s-new-architecture-fa7c708c1d11ea33.md): Heroku Engineering · 2022-01-19 · Medium · 9 min read · Incidents & postmortems, Debugging, Ruby, Networking, Load balancing
  Moving Heroku's Rendezvous proxy, which splices CLI and one-off dyno connections across NATs, from EC2 Classic to VPC behind AWS Network Load Balancers with TLS termination broke one customer's request-scoped one-off dyno workflow with H12 router timeouts.

## 2022-01-12

- [That Old Certificate Expired and Started an Outage. This is What Happened Next](https://swe.quest/articles/that-old-certificate-expired-and-started-an-outage-this-is-what-happened-next-8e9755960d247908.md): Shopify Engineering · 2022-01-12 · Medium · 6 min read · Incidents & postmortems, Cryptography, Ruby, Supply chain security, Deployment
  When Let's Encrypt's old root certificate expired on September 30, 2021, Shopify's internal service-to-service HTTPS calls began failing because the Ruby httpclient gem, pulled in transitively by rack-oauth2, openid\_connect and google-api-client, ships its own six-year-old cacert.pem that trusted neither the expired root nor the new one.

## 2021-10-19

- [GitHub Does My Operations Homework: A Ruby Speed Story](https://swe.quest/articles/github-does-my-operations-homework-a-ruby-speed-story-423c3866d401e486.md): Shopify Engineering · 2021-10-19 · Medium · 8 min read · CI/CD, Performance engineering, Ruby, Compilers
  Shopify's YJIT team runs a continuously updated public benchmark site, speed.yjit.org, that reports YJIT as 20.6% faster than interpreted CRuby and 17.4% faster than MJIT overall, and 18.5% faster than CRuby on Railsbench.

## 2021-10-15

- [Try Out YJIT for Faster Rubying](https://swe.quest/articles/try-out-yjit-for-faster-rubying-6105453188fbb741.md): Shopify Engineering · 2021-10-15 · Medium · 7 min read · Ruby, Compilers, Runtimes & VMs, Performance engineering
  YJIT, Shopify's just-in-time compiler built into CRuby and slated for Ruby 3.1, compiles frequently used Ruby code to native machine code, speeding up a simple Rails benchmark by 20% or more and a real Shopify web service by about 6% on canary traffic.

## 2021-10-14

- [YJIT: Building a New JIT Compiler for CRuby](https://swe.quest/articles/yjit-building-a-new-jit-compiler-for-cruby-51c5ee3c390b2164.md): Shopify Engineering · 2021-10-14 · Easy · 6 min read · Compilers, Ruby, Runtimes & VMs, Performance engineering
  YJIT is a new JIT compiler built inside CRuby by Shopify and GitHub engineers, based on Basic Block Versioning, and aimed at real-world workloads like Rails where the GCC-based MJIT has struggled.

## 2021-09-27

- [Partitioning GitHub’s relational databases to handle scale](https://swe.quest/articles/partitioning-github-s-relational-databases-to-handle-scale-7b5ea75acfc088c0.md): GitHub Engineering · 2021-09-27 · Medium · 9 min read · MySQL, Distributed databases, Scaling, Schema migrations, Ruby
  GitHub split its monolithic \`mysql1\` MySQL cluster by first virtually partitioning tables into schema domains (declared in YAML) and enforcing boundaries with query and transaction linters, then physically moving domains to new clusters via Vitess vertical sharding or a custom ProxySQL/GTID-based write-cutover script.

## 2021-09-22

- [Making Shopify’s Flagship App 20% Faster in 6 Weeks Using a Novel Caching Solution](https://swe.quest/articles/making-shopify-s-flagship-app-20-faster-in-6-weeks-using-a-novel-caching-100f1c4cb3fa31e6.md): Shopify Engineering · 2021-09-22 · Medium · 8 min read · Caching, Ruby, Scaling, Deployment, Performance engineering
  Shop's home feed, which aggregated orders and carrier tracking data and accounted for 30% of database load, was moved behind a custom write-through cache in Memcached, cutting database load by 15%, overall GraphQL latency by about 20% and CPU usage by a double-digit percentage.

## 2021-08-20

- [Diggin’ and Fetchin’ with TruffleRuby](https://swe.quest/articles/diggin-and-fetchin-with-truffleruby-52a4362b84ef4768.md): Shopify Engineering · 2021-08-20 · Medium · 13 min read · Ruby, Runtimes & VMs, Performance engineering, Compilers
  Refactoring a chained Hash#fetch with default values leads to prototyping a new Hash#dig\_fetch method in TruffleRuby, combining fetch's KeyError/default semantics with dig's nested traversal.

## 2021-08-06

- [Understanding GraphQL for Beginners–Part Three](https://swe.quest/articles/understanding-graphql-for-beginners-part-three-fa434e0e0fd5a698.md): Shopify Engineering · 2021-08-06 · Medium · 6 min read · GraphQL, Ruby, API design
  GraphQL mutations are the write side of the API, the counterpart to POST, PUT and DELETE in REST.

## 2021-07-13

- [Shopify-Made Patterns in Our Rails Apps](https://swe.quest/articles/shopify-made-patterns-in-our-rails-apps-92bda4387ca54f09.md): Shopify Engineering · 2021-07-13 · Easy · 8 min read · Ruby, Developer productivity, Distributed databases, System design, Schema migrations
  Shopify's Rails monolith relies on a set of in-house patterns: the dev CLI for consistent environment setup, a podded architecture that shards the full infrastructure stack by shop, and domain-driven components that share a single database with no database-level foreign keys.

## 2021-07-08

- [High Availability by Offloading Work Into the Background](https://swe.quest/articles/high-availability-by-offloading-work-into-the-background-e2fbdc591d2490c8.md): Shopify Engineering · 2021-07-08 · Medium · 14 min read · Queues & messaging, Resilience, Ruby, Scaling, Consistency models
  Moving slow, resource-heavy or error-prone work such as emails, image processing, webhooks and imports out of the request-response cycle into queued background jobs keeps application servers available and responsive.

## 2021-07-02

- [Understanding GraphQL for Beginners–Part Two](https://swe.quest/articles/understanding-graphql-for-beginners-part-two-824dc64184274e82.md): Shopify Engineering · 2021-07-02 · Medium · 8 min read · GraphQL, Ruby, API design
  A beginner walkthrough of adding GraphQL to a Ruby on Rails app using a food-and-nutrition example.

## 2021-05-26

- [Why (and how) GitHub is adopting OpenTelemetry](https://swe.quest/articles/why-and-how-github-is-adopting-opentelemetry-0b6fb60f67930892.md): GitHub Engineering · 2021-05-26 · Medium · 4 min read · Observability, Ruby
  GitHub is standardizing on OpenTelemetry to replace a patchwork of statsd dialects, syslog-format logs and OpenTracing traces that made cross-signal correlation hard and forced repeated instrumentation work.

## 2021-04-27

- [How we ship code faster and safer with feature flags](https://swe.quest/articles/how-we-ship-code-faster-and-safer-with-feature-flags-49a97b8efaf60044.md): GitHub Engineering · 2021-04-27 · Medium · 9 min read · Deployment, CI/CD, Testing, Refactoring & migrations, Ruby
  GitHub puts risky changes and in-progress features behind feature flags so it can deploy continuously and disable problems in seconds instead of rolling back a deployment over several minutes.

## 2021-04-05

- [How we scaled the GitHub API with a sharded, replicated rate limiter in Redis](https://swe.quest/articles/how-we-scaled-the-github-api-with-a-sharded-replicated-rate-limiter-in-redis-c2f9366d9d874889.md): GitHub Engineering · 2021-04-05 · Medium · 9 min read · Caching, Replication, API design, Scaling, Ruby
  GitHub replaced a Memcached-based API rate limiter, which suffered evictions and could not survive a move to per-datacenter caches, with application-sharded Redis clusters (one primary, several read replicas) and atomic Lua scripts, rolled out behind a feature flag.

## 2021-03-26

- [How to Build a Web App with and without Rails Libraries](https://swe.quest/articles/how-to-build-a-web-app-with-and-without-rails-libraries-4251321e95591e52.md): Shopify Engineering · 2021-03-26 · Medium · 28 min read · Ruby, Networking, API design
  Builds a small birthday-tracker web app called Mirth from scratch in plain Ruby, then rebuilds it with Rails components to show what each layer abstracts away.

## 2021-03-19

- [Remove Circular Dependencies by Using Dependency Injection and the Repository Pattern in Ruby](https://swe.quest/articles/remove-circular-dependencies-by-using-dependency-injection-and-the-repository-605bdeddd937fd64.md): Shopify Engineering · 2021-03-19 · Medium · 8 min read · Ruby, Refactoring & migrations, Type systems, Testing
  Shopify broke a circular dependency between an internal pricing gem and its two consumers (the Shopify Core Rails monolith and the Storefront Renderer) by applying the Repository pattern with constructor-based dependency injection.

Same list as RSS: [https://swe.quest/feed.xml?tag=ruby](https://swe.quest/feed.xml?tag=ruby). Lists take `?page=`, `?per=12|24|48|96` and, on the home page, `?tag=` (up to 3), `?source=`, `?difficulty=easy|medium|hard` and `?search=`.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
