title: Unable to install cocoapods on Catalina
body: <p>I have catalina OS 10.15.7 and XCode Version 12.4 (12D4e)
  I am trying to install cocoapods using gem:</p>
  <pre><code>sudo gem install cocoapods
  </code></pre>
  <p>And I am getting this error:</p>
  <pre><code>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.
  </code></pre>
  <p>It has been a nightmare to resolve this.
  I tried using brew install. Brew is able to install it. But the pod does not work. when I use simple commands like</p>
  <pre><code>pod init
  or 
  pod -v
  </code></pre>
  <p>I am getting this error:</p>
  <pre><code>Traceback (most recent call last):
      16: from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/bin/pod:23:in `&lt;main&gt;'
      15: from /Library/Ruby/Site/2.6.0/rubygems.rb:285:in `activate_bin_path'
      14: from /Library/Ruby/Site/2.6.0/rubygems.rb:285:in `synchronize'
      13: from /Library/Ruby/Site/2.6.0/rubygems.rb:286:in `block in activate_bin_path'
      12: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1369:in `activate'
      11: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1387:in `activate_dependencies'
      10: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1387:in `each'
       9: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1405:in `block in activate_dependencies'
       8: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1369:in `activate'
       7: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1387:in `activate_dependencies'
       6: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1387:in `each'
       5: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1405:in `block in activate_dependencies'
       4: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1369:in `activate'
       3: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1387:in `activate_dependencies'
       2: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1387:in `each'
       1: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1399:in `block in activate_dependencies'
  /Library/Ruby/Site/2.6.0/rubygems/dependency.rb:311:in `to_specs': Could not find 'minitest' (&gt;= 5.1) among 39 total gem(s) (Gem::MissingSpecError)
  Checked in 'GEM_PATH=/Users/pankajnafria/.local/share/gem/ruby/2.6.0:/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0:/usr/local/Cellar/cocoapods/1.11.2_1/libexec' , execute `gem env` for more information
      16: from /usr/local/Cellar/cocoapods/1.11.2_1/libexec/bin/pod:23:in `&lt;main&gt;'
      15: from /Library/Ruby/Site/2.6.0/rubygems.rb:285:in `activate_bin_path'
      14: from /Library/Ruby/Site/2.6.0/rubygems.rb:285:in `synchronize'
      13: from /Library/Ruby/Site/2.6.0/rubygems.rb:286:in `block in activate_bin_path'
      12: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1369:in `activate'
      11: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1387:in `activate_dependencies'
      10: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1387:in `each'
       9: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1405:in `block in activate_dependencies'
       8: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1369:in `activate'
       7: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1387:in `activate_dependencies'
       6: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1387:in `each'
       5: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1405:in `block in activate_dependencies'
       4: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1369:in `activate'
       3: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1387:in `activate_dependencies'
       2: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1387:in `each'
       1: from /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1398:in `block in activate_dependencies'
  /Library/Ruby/Site/2.6.0/rubygems/specification.rb:1401:in `rescue in block in activate_dependencies': Could not find 'minitest' (&gt;= 5.1) among 39 total gem(s) (Gem::MissingSpecError)
  Checked in 'GEM_PATH=/Users/pankajnafria/.local/share/gem/ruby/2.6.0:/System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib/ruby/gems/2.6.0:/usr/local/Cellar/cocoapods/1.11.2_1/libexec' at: /usr/local/Cellar/cocoapods/1.11.2_1/libexec/specifications/activesupport-6.1.4.1.gemspec, execute `gem env` for more information 
  </code></pre>
  <p>Appreciate any help in resolving this issue.</p>