Ruby on a Mac: how big each version is, what gems add, and what Bundler repeats

By the Zofle team · 16 November 2026 · 5 min read

Ruby version, gem and Bundler sizes from macOS arm64 builds

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/bundle repeats them per project.
  • Cleanup is three supported steps: remove unused Ruby versions, gem cleanup and bundle clean. Preview first.
bash
# Homebrew chooses the right paths for Apple silicon or Intel
brew --prefix
brew --cellar
brew --caskroom
brew --cache

# measure each place
du -sh "$(brew --cellar)" "$(brew --caskroom)" "$(brew --cache)"

# preview, then clean old versions and downloads
brew cleanup --dry-run
brew cleanup

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.

RubyDownload (tar.gz)UnpackedFilesStandard libraryBundled gemslibruby
3.4.12 (Oct 2026)15.2 MB50.9 MB3,05125.0 MB17.2 MB7.0 MB
3.3.1311.3 MB37.7 MB2,52018.2 MB11.6 MB6.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

bash
# rbenv: every installed version is its own folder
du -sh ~/.rbenv/versions/* | sort -h
rbenv versions

# rvm
du -sh ~/.rvm/rubies/* | sort -h
rvm list

# which version this project actually uses
rbenv 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.

bash
# remove a version you are sure no project uses
rbenv uninstall 3.2.6
rvm remove 3.2.6

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:

GemSource gemarm64-darwin gem
nokogiri 1.19.74.39 MB6.58 MB
sqlite3 2.10.23.41 MB3.31 MB
grpc 1.85.07.89 MB15.58 MB
google-protobuf 4.36.20.33 MB0.94 MB
ffi 1.17.40.89 MB0.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:

bash
# gems for this Ruby version
gem env gemdir
du -sh "$(gem env gemdir)"

# project-local gems (if you use vendor/bundle)
du -sh vendor/bundle 2>/dev/null
find ~ -maxdepth 4 -type d -name bundle -path "*vendor*" -prune 2>/dev/null
bundle config

Clean up, with a preview first

bash
# old versions of gems you have updated
gem cleanup --dry-run
gem cleanup

# gems no longer in this project's Gemfile.lock
bundle clean --dry-run
bundle clean
  • gem cleanup removes older versions of gems that have a newer one installed; a project locked to an old version reinstalls it with bundle install.
  • bundle clean only removes gems that aren't in the current Gemfile.lock; --dry-run shows 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 Mac

Sources and method

  • ruby/ruby-builder releases: ruby-3.4.12-darwin-arm64.tar.gz (published 23 October 2026) and ruby-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 cleanup and bundle clean --dry-run come 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.

One email when it's ready. No spam, ever.