pod install -bash: pod: command not found

后端 未结 21 2747
野的像风
野的像风 2020-11-28 19:06

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:

21条回答
  •  野趣味
    野趣味 (楼主)
    2020-11-28 19:38

    so I also had the same problem. This is probably happening because your computer has an older version of ruby. So you need to first update your ruby. Mine worked for ruby 2.6.3 version.I got this solution from sStackOverflow,

    You need to first open terminal and put this code

    curl -L https://get.rvm.io | bash -s stable
    

    Then put this command

    rvm install ruby-2.6
    

    This would install the ruby for you if it hasn' t been installed.After this just update the ruby to the new version

    rvm use ruby-2.6.3
    

    After this just make ruby 2.6.3 your default

    rvm --default use 2.6.3
    

    This would possibly fix your issue. You can now put the command

    sudo gem install cocoapods
    

    And the command

    pod setup
    

    I hope this was useful

提交回复
热议问题