---
title: "Adopting Sorbet at Scale"
description: "Shopify describes its adoption of Sorbet static typing across a Ruby monolith containing 37,000 files, 622,000 methods, and more than 2,000,000 calls. At the time of writing, Sorbet ran on every pull request, 80% of files were typed: true or higher, almost half of calls were typed, and half of methods had signatures. To handle Ruby and Rails idioms, the team built RuboCop Sorbet for compatibility rules, Tapioca for gem and DSL RBI generation, and Spoom for programmatic tooling, metrics, and LSP access. A controlled experiment found fewer production NoMethodErrors in files typed: true after typing about 20% of the application, although the results were preliminary and signatures had not yet been added. Shopify planned to reach typed: true across all files, improve Rails support, and continue collaboration around Sorbet and RBS."
---

# Adopting Sorbet at Scale

[Shopify](https://yomu.fyi/company/shopify) · 2023-10-18 · Nov 19, 2020

**Type:** Explainer

## Summary

Shopify describes its adoption of Sorbet static typing across a Ruby monolith containing 37,000 files, 622,000 methods, and more than 2,000,000 calls. At the time of writing, Sorbet ran on every pull request, 80% of files were typed: true or higher, almost half of calls were typed, and half of methods had signatures. To handle Ruby and Rails idioms, the team built RuboCop Sorbet for compatibility rules, Tapioca for gem and DSL RBI generation, and Spoom for programmatic tooling, metrics, and LSP access. A controlled experiment found fewer production NoMethodErrors in files typed: true after typing about 20% of the application, although the results were preliminary and signatures had not yet been added. Shopify planned to reach typed: true across all files, improve Rails support, and continue collaboration around Sorbet and RBS.

## Context

Shopify’s rapidly changing Ruby monolith, with extensive use of gems, Rails, metaprogramming, and internal DSLs, made it difficult to ensure stability with a dynamic language despite rigorous reviews and more than 150,000 tests.

## Approach / What changed

The team adopted Sorbet gradually and built open-source tooling around it: RuboCop Sorbet makes code compatible and enforces typing conventions, Tapioca generates RBI files for gems and runtime-defined DSL methods, and Spoom provides programmatic access, metrics, coverage reporting, strictness upgrades, and Sorbet LSP integration.

## Takeaways

- RuboCop Sorbet automatically corrects or forbids Ruby constructs that Sorbet cannot understand and enforces minimum typed levels and signature conventions.
- Tapioca uses runtime introspection to generate versioned RBI files for gems and DSL-generated methods from Rails and other libraries.
- In a preliminary controlled experiment, typing roughly 20% of the application without signatures correlated with fewer production NoMethodErrors in files marked typed: true.

**Tags:** [Open Source](https://yomu.fyi/topic/open-source), [Ruby](https://yomu.fyi/topic/ruby), [Sorbet](https://yomu.fyi/topic/sorbet), [Static Typing](https://yomu.fyi/topic/static-typing)

- Source: [Shopify](https://shopify.engineering/adopting-sorbet)
- Source URL: https://shopify.engineering/adopting-sorbet
- Ingested by Yomu: 2026-08-31T01:11:13.165Z

[Read original post](https://shopify.engineering/adopting-sorbet)
