I am using Macbook with M1 chip so that default installation of cocoapods doesn't work because of Ruby crash. I applied solution of installing independent ruby from below SO post. After I applied this solution, now I have two Cocoapods installation on my machine. One is on /usr/local/bin/pod (the default one which is not working with M1) and other is in $(brew --prefix)/lib/ruby/gems/3.0.0/bin/pod.
What I want to achieve: When I run Which pod I want that path in ruby/gems/3.... will shown so make that pod source path as default.
P.S: When I check my ruby and gem source with Which gem and Which ruby It shows right path. I tried to run sudo gem install cocoapods after uninstall it but didn't work.
 
    