Ios – pod install -bash: pod: command not found

cocoapodsiospod-install

I installed pod some time ago. However, it's stopped working so I'm working through this again.

However, I almost immediately run into a problem here:

pod install
-bash: pod: command not found

Any suggestions why this happened?

Best Answer

OK, found the problem. I upgraded Ruby some time ago and blasted away a whole load of gems. Solution:

sudo gem install cocoapods

For none-sudo use:

export GEM_HOME=$HOME/.gem
export PATH=$GEM_HOME/bin:$PATH
gem install cocoapods --user-install