Install cocoapods with gem not with Homebrew
1 |
sudo gem install cocoapods |
but first find stable version of gem and ruby
if already installed then update gem
1 |
gem update --system |
Install Ruby via RVM
1. Install RVM as per instructions
or
1 |
curl -L https://get.rvm.io | bash -s -- --version latest |
then
1 |
source ~/.rvm/scripts/rvm |
1 |
type rvm | head -n 1 |
If the output is:
rvm is a function
You may need to add “source ~/.rvm/scripts/rvm” to your ~/.bash_profile file
2. Install Ruby
1 |
rvm install (ruby version) |
1 |
rvm --default use (ruby version) |
eg:
1 |
rvm install 2.7.2 |
can use rvm list
to see available ruby versions.
check location of ruby
1 |
which -a ruby |
1 |
which ruby |