1

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.

Solution I applied

Emre Önder
  • 2,408
  • 2
  • 23
  • 73

1 Answers1

1

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

goodhyun
  • 4,814
  • 3
  • 33
  • 25