permission issue pod

PHOTO EMBED

Tue May 16 2023 11:27:12 GMT+0000 (Coordinated Universal Time)

Saved by @hasnat #ios #swift #pod #permission

ERROR:  While executing gem ... (Gem::FilePermissionError)

    You don't have write permissions for the /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0 directory.




Hi Guys, My solution (on Big Sur 11.6.2):

Step 1:

Install brew

1. curl -fsSL -o install.sh https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh
 Save
2. /bin/bash install.sh
 Save
Step 2:

brew install chruby ruby-install
 Save
Step 3:

brew install cocoapods
 Save
Step 4: (Check your cocoapods version):

brew upgrade cocoapods
 Save
Képernyőfotó 2022-01-17 - 16.18.41.png

Need Xcode Command Line Tools, if not installed then run this command: sudo xcode-select --install
content_copyCOPY