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.
PS: 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.
It might be all due to the good old path issues. Just bring this line up to the first line of your .zshrc
export PATH=/opt/homebrew/opt/ruby/bin:/opt/homebrew/lib/ruby/gems/3.0.0/bin:$PATH
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.