cocoapods的最新安装 遇到的坑 Error installing pods:activesupport requires Ruby version >= 2.2.2

之前安装cocoapods根据http://www.tuicool.com/articles/7VvuAr3类似文章,有淘宝镜像等等来配置ruby环境安装cocoa pods,很成功,目前我的系统是10.11.5版本,再次用同样的安装却不行,出现ruby版本过低,需要2.2.2版本以上,而使用上述方法ruby版本只能更新到2.1,git可以成功安装,但cocoapods却出现了那个错误。在网上查了很多资料,最终找到解决办法:只有成功更新ruby版本到2.2.2以上,再接着那篇文章继续安装cocoapods即可。
以下方法可以把ruby版本升级到2.3版本,so cool!

提示
大家在第一步的就会卡那了,好像出现Could not download ‘https://bitbucket.org/mpapis/rvm/get/1.27.0.tar.gz‘.这个问题,我当时以为不行,就直接没有进行下去,后来发现,不用管这个问题,直接按照下面步骤向下继续就可以成功了。

ruby升级终端执行步骤

1、安装 RVM
RVM:Ruby Version Manager,Ruby版本管理器,包括Ruby的版本管理和Gem库管理(gemset)
curlLget.rvm.io|bashsstableRVM source ~/.bashrc
$ source ~/.bash_profile

测试是否安装正常
rvm -v

2、用RVM升级Ruby
查看当前ruby版本
$ ruby -v
ruby 1.8.7

列出已知的ruby版本
rvmlistknownruby1.9.3 rvm install 1.9.3
安装完成之后ruby -v查看是否安装成功。

3.参考链接
http://blog.csdn.net/lissdy/article/details/9191351
http://www.360doc.com/content/16/0726/11/35363330_578458608.shtml

cocoa pods安装与使用

1.sudo gem install cocoa pods
这样就下载安装好了CocoaPods
2.cocoapods使用
a、新建一个项目,名字PodTest

b、终端中,cd到项目总目录(注意:包含PodTest文件夹、PodTest.xcodeproj、PodTestTest的那个总目录)(简便方法:直接把那个文件夹拉到终端,终端就会自动输入该文件夹的路径,注意先写上cd命令)

c、建立Podfile(配置文件)
接着上一步,终端输入 vim Podfile

d、键盘输入 i,进入编辑模式,输入
platform :ios, ‘7.0’
pod ‘MBProgressHUD’, ‘~> 0.8’

e、然后按Esc,并且输入“ :”号进入vim命令模式,然后在冒号后边输入wq
注意:键盘输入 :后,才能输入wq。回车后发现PodTest项目总目录中多一个Podfile文件

f、激动人心的时刻到了:确定终端cd到项目总目录,然后输入 pod install,等待一会,大约3分钟。
注意:现在打开项目不是点击 PodTest.xodeproj了,而是点击 PodTest.xcworkspace

参考链接:http://blog.csdn.net/showhilllee/article/details/38398119
这个链接详细介绍了cocoapods的安装与使用,还有一些pod安装第三方框架的命令,挺好的,根据这篇博客和我上述的ruby升级的那篇博客,现在安装cocoapods绝对杠杠的,保证成功!

注:感觉写一篇博客还挺麻烦的,所以一般我参考的博客都会附上链接,以尊重别人的成果。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
ERROR: Could not find a version that satisfies the requirement numpy>=1.14.3. This error message indicates that the required version of numpy (>=1.14.3) could not be found or installed. The reason for this error could be that your current numpy version is lower than the required version. To resolve this issue, you can try upgrading numpy to a version that meets the requirement. However, please note that upgrading numpy may also require updating other dependencies, such as pip, to ensure compatibility. Alternatively, you can try installing a specific version of numpy that satisfies the requirement. You can specify the version in the installation command using the following syntax: "pip install numpy==<desired_version>". For example, if you want to install numpy version 1.20.0, you can run "pip install numpy==1.20.0". If you encounter any further errors or difficulties during the installation process, please provide more details about the specific error message or the steps you have taken so far. This will help to provide more accurate guidance on resolving the issue.<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* [Could not find a version that satisfies the requirement numpy>=1.20.0 (from imageio) 解决办法](https://blog.csdn.net/m0_59822830/article/details/125097129)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] - *2* *3* [配置 MLTP:win10+PyCharm+conda](https://blog.csdn.net/qq_43611382/article/details/124877862)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_1"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值