Ruby on a Mac: how big each version is, what gems add, and what Bundler repeats
Ruby on a Mac doesn't live in one place. rbenv or rvm keeps a full copy of every Ruby version you installed, each version carries its own gems, and Bundler can add another copy inside each project. We measured real Ruby builds and the gems people most often add, so you can see where the space goes.
The quick version
- A compiled Ruby for Apple silicon is about 51 MB (3.4.12) or 38 MB (3.3.13) on disk before you install any gem.
- With rbenv or rvm, each Ruby version is a separate copy. Three versions you forgot are about 120 MB.
- Gems add the real weight: 5 popular ones with prebuilt Mac binaries are about 27 MB (compressed) per copy, and Bundler's
vendor/bundlerepeats them per project. - Cleanup is three supported steps: remove unused Ruby versions,
gem cleanupandbundle clean. Preview first.
What one Ruby takes
We downloaded the official prebuilt macOS arm64 Ruby packages from the ruby/ruby-builder releases (the ones GitHub Actions uses) and summed every file inside.
| Ruby | Download (tar.gz) | Unpacked | Files | Standard library | Bundled gems | libruby |
|---|---|---|---|---|---|---|
| 3.4.12 (Oct 2026) | 15.2 MB | 50.9 MB | 3,051 | 25.0 MB | 17.2 MB | 7.0 MB |
| 3.3.13 | 11.3 MB | 37.7 MB | 2,520 | 18.2 MB | 11.6 MB | 6.3 MB |
Ruby 3.4 is 13.2 MB (35%) bigger than 3.3. A source build with rbenv's ruby-build can differ from this prebuilt package; for instance it normally installs the <code>ri</code> documentation too unless you pass <code>--disable-install-doc</code>. Measure your own folders with the commands below.
rbenv and rvm: one copy per version
Worked example (arithmetic from the table, not a Mac reading): you installed 3.2, 3.3 and 3.4 over three years and never removed any. Using 3.4.12 (50.9 MB), 3.3.13 (37.7 MB) and an assumed 3.2 of about 35 MB, the folders add up to roughly 124 MB before gems. Removing the two you don't use frees about 73 MB.
Check each project's <code>.ruby-version</code> or <code>Gemfile</code> first: a project that asks for a missing Ruby won't start.
Gems: where the real size is
Gem files from rubygems.org give a lower bound; installed gems are larger once unpacked. We read the Content-Length of the current release of each gem, for the source gem and for the prebuilt <code>arm64-darwin</code> one:
| Gem | Source gem | arm64-darwin gem |
|---|---|---|
| nokogiri 1.19.7 | 4.39 MB | 6.58 MB |
| sqlite3 2.10.2 | 3.41 MB | 3.31 MB |
| grpc 1.85.0 | 7.89 MB | 15.58 MB |
| google-protobuf 4.36.2 | 0.33 MB | 0.94 MB |
| ffi 1.17.4 | 0.89 MB | 0.49 MB |
Gems with native code (grpc, nokogiri, google-protobuf) are the heavy ones, and grpc's Mac binary gem is twice the size of the source one. The five together: 6.58 + 3.31 + 15.58 + 0.94 + 0.49 = 26.9 MB of downloads per copy.
Bundler: another copy in every project
By default Bundler installs gems once per Ruby version. If you set <code>BUNDLE_PATH</code> or run <code>bundle config set path vendor/bundle</code>, each project gets its own copy instead.
Worked example, lower bound from the five gems: 10 projects × 26.9 MB = 269 MB; unpacked it is more. Compare for yourself:
Clean up, with a preview first
gem cleanupremoves older versions of gems that have a newer one installed; a project locked to an old version reinstalls it withbundle install.bundle cleanonly removes gems that aren't in the currentGemfile.lock;--dry-runshows what.- Never delete the macOS system Ruby in
/usr/bin/ruby; stay inside your version manager's folders.
If Ruby is small on your Mac, check the other developer tools: Homebrew, Go modules and Gradle and node_modules.
Zofle shows your developer folders by size, so you can compare Ruby versions, gems and other tool caches before you remove one.
Download Zofle for MacSources and method
- ruby/ruby-builder releases:
ruby-3.4.12-darwin-arm64.tar.gz(published 23 October 2026) andruby-3.3.13-darwin-arm64.tar.gz; we downloaded both and summed the uncompressed file sizes by folder on 16 November 2026. These are prebuilt packages, not rbenv builds on our own Mac. - RubyGems API and download URLs: Content-Length of the latest release files of each gem, source and
arm64-darwin, read 16 November 2026. - Commands
gem cleanupandbundle clean --dry-runcome from the RubyGems and Bundler documentation. The 124 MB, 73 MB and 269 MB figures are worked arithmetic and include one assumed size (Ruby 3.2); numbers are decimal megabytes.
Zofle Pro news
People signing up now will get Zofle Pro, with more features, for free when we launch it.