zoukankan      html  css  js  c++  java
  • no implicit conversion of nil into String

    一、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解决

  • 相关阅读:
    Vue 子组件接收父组件的值
    Vue 子组件调用父组件的方法
    dedecms大量删除文章后,列表页显示错误修复办法
    怎么才能快速的删除指定栏目、指定日期、指定id之间的织梦文章内容?
    怎么才能快速的彻底删除织梦文章内容?
    织梦删除专题,删除文章时出现错误inc_batchup.php on line 17 如何解决?
    windows环境下更改Mysql数据库存储位置的具体步骤
    JsonP原理
    建一个别人打不开的文件夹
    Dos环境变量修改
  • 原文地址:https://www.cnblogs.com/doudouyoutang/p/10716376.html
Copyright © 2011-2022 走看看