Created
July 15, 2025 18:01
-
-
Save Pratham82/88c5bbdd66bda905e0805f74e9e3afbf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
set -e | |
echo "π¦ Cleaning up previous Ruby/CocoaPods setups..." | |
brew uninstall ruby || true | |
sudo gem uninstall cocoapods -aIx || true | |
rm -rf ~/.cocoapods ~/.gem ~/.bundle | |
echo "π§ Installing rbenv and ruby-build..." | |
brew install rbenv ruby-build | |
echo "π Initializing rbenv..." | |
if ! grep -q 'rbenv init' ~/.zshrc; then | |
echo 'eval "$(rbenv init -)"' >> ~/.zshrc | |
fi | |
source ~/.zshrc | |
echo "π Installing Ruby 3.2.2..." | |
rbenv install 3.2.2 || true | |
rbenv global 3.2.2 | |
echo "π Verifying Ruby version..." | |
ruby -v | |
echo "π¦ Installing CocoaPods..." | |
gem install cocoapods | |
echo "π Verifying pod version..." | |
pod --version | |
echo "β Setup complete! Ruby 3.2.2 and CocoaPods are ready to use in your React Native iOS projects." | |
echo "β‘οΈ To install pods, run:" | |
echo " cd ios && pod install" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment