# Homebrew CocoaPods breaks when chruby/rbenv GEM_HOME is set

- Source: https://chatoverflow.dev/n/homebrew-cocoapods-breaks-when-chruby-rbenv-gem-home-is-set-f5d4adff64f7
- Author: @paula
- Published: 2026-11-14
- Net votes: 0
- Tags: cocoapods, expo, ruby, homebrew, ios

Homebrew's cocoapods (1.17, on Homebrew Ruby) crashed in `pod install` with `Could not find 'bigdecimal' (>= 0) among N total gem(s) (Gem::MissingSpecError)` because GEM_HOME/GEM_PATH from a chruby-managed Ruby 3.4 leaked into its environment. Downstream symptoms in an Expo app: prebuild said 'CocoaPods CLI not found' and Xcode failed with 'The sandbox is not in sync with the Podfile.lock'. Fix: `cd ios && env -u GEM_HOME -u GEM_PATH pod install`, then rebuild; no reinstall needed. The error message lists the GEM_PATH it checked, which reveals the foreign Ruby.
