一、Cocoapod 执行pod install命令时报错

  

[!] An error occurred while processing the post-install hook of the Podfile.

no implicit conversion of nil into String

/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/pathname.rb:349:in `initialize'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/pathname.rb:349:in `new'
/System/Library/Frameworks/Ruby.framework/Versions/2.3/usr/lib/ruby/2.3.0/pathname.rb:349:in `+'
/Library/Ruby/Gems/2.3.0/gems/xcodeproj-1.8.1/lib/xcodeproj/project.rb:103:in `open'
/Users/xxx/Documents/WorkCode/DoorCamera/mihomeinternal/MiHome/SegmentPodfile/pre_and_post_install.rb:20:in `block in pod_pre_post_install'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-core-1.6.1/lib/cocoapods-core/podfile.rb:179:in `post_install!'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:701:in `run_podfile_post_install_hook'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:689:in `block in run_podfile_post_install_hooks'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/user_interface.rb:145:in `message'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:688:in `run_podfile_post_install_hooks'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:211:in `block in generate_pods_project'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:208:in `generate_pods_project'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/installer.rb:139:in `install!'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/command/install.rb:48:in `run'
/Library/Ruby/Gems/2.3.0/gems/claide-1.0.2/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.3.0/gems/cocoapods-1.6.1/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'

 

二、解决

  这个原因是因为ruby的版本比较低导致的,需要更新ruby的版本

  执行以下命令:

  

➜  MiHome git:(doorscamera) ✗ cd "$(brew --repo)" && git fetch && git reset --hard origin/master && brew update
HEAD is now at b4f73e616 Merge pull request #6016 from jonchang/update-policy
Already up-to-date.
➜ Homebrew git:(stable) rvm gemset empty default
➜ Homebrew git:(stable) rvm use 3 --default
Required ruby-2.2.5 is not installed.
To install do: 'rvm install "ruby-3"'
➜ Homebrew git:(stable) rvm gemset empty defaultrvm install "ruby-3
dquote>
➜ Homebrew git:(stable) rvm install "ruby-3"

  重新安装ruby解决

no implicit conversion of nil into String的更多相关文章

  1. 升级CocoaPod遇到ERROR: While executing gem ... (TypeError) no implicit conversion of nil into String问题的解决方法

    如下图: 先执行命令: gem update --system 再升级: sudo gem install cocoapods --pre 这样就能够正常升级了.

  2. Implicit conversion from enumeration type 'enum CGImageAlphaInfo' to different enumeration type 'CGB

    Implicit conversion from enumeration type 'enum CGImageAlphaInfo' to different enumeration type 'CGB ...

  3. (转)怎么去掉Xcode工程中的某种类型的警告 Implicit conversion loses integer precision: 'NSInteger' (aka 'long') to 'int32

    问题描述  在我们的项目中,通常使用了大量的第三方代码,这些代码可能很复杂,我们不敢改动他们,可是作者已经停止更新了,当sdk升级或者是编译器升级后,这些遗留的代码可能会出现许许多多的警告,那么我们有 ...

  4. 怎么去掉Xcode工程中的某种类型的警告 Implicit conversion loses integer precision: 'NSInteger' (aka 'long') to 'int32

    unsigned long numComponents = CGColorGetNumberOfComponents([[UIColor blackColor] CGColor]); 2014年12月 ...

  5. 怎么去掉Xcodeproject中的某种类型的警告 Implicit conversion loses integer precision: &#39;NSInteger&#39; (aka &#39;long&#39;) to &#39;int32

    问题描写叙述  在我们的项目中,通常使用了大量的第三方代码,这些代码可能非常复杂,我们不敢修改他们,但是作者已经停止更新了,当sdk升级或者是编译器升级后,这些遗留的代码可能会出现许很多多的警告,那么 ...

  6. MATLAB/Octave中implicit conversion from real matrix to real scalar错误原因与解决

    写程序时提示 implicit conversion from real matrix to real scalar的一个warning,主要问题在于将一个矩阵当成一个标量在使用.我的程序出现这个wa ...

  7. solidity智能合约implicit conversion异常

    问题场景 在使用^0.5.10版本的solidity时,如果使用this关键字会出现以下问题. 代码: require(tokenContract.balanceOf(this) >= _num ...

  8. std::u32string conversion to/from std::string and std::u16string

    I need to convert between UTF-8, UTF-16 and UTF-32 for different API's/modules and since I know have ...

  9. c++隐式转换(implicit conversion)

    1.缘由 最近在使用nlohmann的json,发现有些地方不是特别好用,所以就想自己修改一下(目的是为了增加类似jsoncpp中可以//增加注释的功能),在看源码的时候看到了一个迷惑的地方,就是解析 ...

  10. Implicit conversion from enumeration type 'enum CGImageAlphaInfo' to different enumeration type 'CGBitmapinfo' (aka) 'enum CGBitmapInfo')

    The constants for specifying the alpha channel information are declared with the CGImageAlphaInfo ty ...

随机推荐

  1. Detectron2环境配置+Ubantu+CUDA10.1+pytorch1.7.0

    Detectron2环境配置 1.创建detectron2 conda环境 conda create -n detectron2 python=3.7 2.激活detectron2 conda环境 c ...

  2. 给picgo上传的图片加个水印

    之前给大家介绍了picgo和免费的图床神器.我们本可以开开心心的进行markdown写作了. 但是总是会有那么一些爬虫网站过来爬你的文章,还把你的文章标明是他们的原著.咋办呢?这里有一个好的办法就是把 ...

  3. 深度解读《深度探索C++对象模型》之拷贝构造函数

    接下来我将持续更新"深度解读<深度探索C++对象模型>"系列,敬请期待,欢迎关注!也可以关注公众号:iShare爱分享,自动获得推文. 写作不易,请有心人到我的公众号上 ...

  4. c#程序员必学清单补充

    作为 C# 程序员,除了上述经典书籍和开源框架外,还需要掌握以下技术: 1. .NET Core 和 ASP.NET Core:了解并熟练掌握 .NET Core 和 ASP.NET Core 框架, ...

  5. winform之在主窗体中不显示子窗体的菜单栏

    在MDi窗体嵌入子窗体后不显示菜单栏 背景: 由于之前做的一个程序的功能全部都是放在一个界面上的,有一个功能能够在数据库查询数据,并返回到界面上,数据量比较小的时候还好,但是数据量多了,导致它阻塞的其 ...

  6. CSS选择器练习--餐厅选择

    1.题目:Select the plates 答案:plate 1 <div class="table"> 2 <plate></plate> ...

  7. DataWorks 如何撑起阿里99%的数据开发?

    阿里妹导读: DataWorks是阿里巴巴自主研发,支撑阿里巴巴经济体99%数据业务建设和治理,每天数万名数据开发和算法开发工程师在使用.从2010年起步到目前的版本,经历了多次技术变革和架构升级,也 ...

  8. Flink 在有赞的实践和应用

    简介: 本文介绍了Flink 在有赞的实践和应用,内容包括:Flink 的容器化改造和实践.Flink SQL 的实践和应用.未来规划. 作者:沈磊 一.Flink 的容器化改造和实践 1. 有赞的集 ...

  9. OceanBase时序数据库CeresDB正式商用 为用户提供安全可靠的数据存储管理服务

    简介: OceanBase完成OLAP和OLTP双重能力并行后,向数据管理领域多模方向迈出第一步. 近日,在数据库OceanBase3.0峰会上,OceanBase CEO杨冰宣布首个时序数据库产品C ...

  10. WPF 简单实现一个支持删除自身的应用

    我准备写一个逗比的应用,然而我担心被小伙伴看到这个应用的文件从而知道是我写的,于是我就需要实现让应用能自删除的功能.核心实现方法就是调用 cmd 传入命令行,等待几秒之后删除文件 应用程序在运行时,是 ...