I ran the install of cocoapods by using sudo gem install cocoapods
.
The command claims to have completed successfully. However when I do gem list cocoapods
it doesn’t show in list. And when I do pod --version
I get an error:
/Users/myname/.rvm/rubies/ruby-2.3.0/lib/ruby/site_ruby/2.3.0/rubygems.rb:271:in `find_spec_for_exe': can't find gem cocoapods (>= 0.a) (Gem::GemNotFoundException)
from /Users/myname/.rvm/rubies/ruby-2.3.0/lib/ruby/site_ruby/2.3.0/rubygems.rb:299:in `activate_bin_path'
from /usr/local/bin/pod:23:in `<main>'
I've tried uninstalling and reinstalling. I think the problem has to do with having an older version 1.0.1 that was installed with Homebrew, and then installing over it using gem install. But I’m not sure.
I also tried uninstalling the Homebrew version as well, but no luck.
I have followed @oyvindhauge advice and it worked like a charm. Just type:
Good luck!