Cocoapods cannot be used/installation failure/failure solution, cocoapods Solution

Source: Internet
Author: User
Tags install cocoapods

Cocoapods cannot be used/installation failure/failure solution, cocoapods Solution

Cocoapods is an integrated management tool for third-party class libraries in ios. It allows you to integrate all the class libraries in git without any configuration, and facilitates management, making your ios Project look less messy. After installing this tool, after a while, you may suddenly find that its commands cannot be used. This problem has something to do with IOS system upgrades. Maybe when you upgrade your mac OS to an official version, it will suddenly be unavailable, so after the ios system is upgraded, we also need to upgrade the cocoapods official new version, otherwise it will not be available. In addition, this problem is related to the cocoapods upgrade, and suddenly cannot be used. When we upgrade, we may find that the upgrade fails. In fact, all these problems finally point to the ruby version. ruby is a cocoapods framework, and cocoapods should be developed with it. To solve the problem of cocoapods errors, first check the default ruby version in the system, including the ruby version that we need to upgrade when installing cocoapods. Next, let's talk about several ruby operation commands. Using these commands can completely solve the problem of cocoapods. I don't want to talk about how to install cocoapods. There are too many online commands and I will find them myself.

 

1. query all currently available ruby version commands:

Rvm list known

 

 

2. Select a version for installation:

Rvm install 2.3

 

The default ruby version in mac OS is 2.0. Currently, cocoapods cannot be installed in ruby of this version.

Yes. You must upgrade ruby.

 

3. query whether the ruby version is installed.

Rvm list

By default, mac OS comes with the ruby version, so after you install a new version, the system will query at least two versions.

 

4. Uninstall redundant ruby versions

Rvm remove 2.2.2 (here, 2.2.2 = the version number in the system, which can be seen in the previous step)

After a new ruby version is installed, You can uninstall the old version.

 

 

5. Set the default ruby version.

 

Rvm 2.2.4 -- default

 

 

6. Check the ruby version set in the previous step.

 

Ruby-v

 

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.