flutter2.0にしたらflutter runでコケた

アップグレード

github.com

flutter2.0が出たのでバージョンを上げた

$ flutter upgrade
$ flutter --version
Flutter 2.0.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 60bd88df91 (22 hours ago) • 2021-03-03 09:13:17 -0800
Engine • revision 40441def69
Tools • Dart 2.12.0

futter run でコケた

バージョンアップ後、flutter runしたらcocoapods(pod install?)でコケた

CocoaPods' output:
↳
      Preparing

    Analyzing dependencies

    Inspecting targets to integrate
      Using `ARCHS` setting to build architectures of target `Pods-Runner`: (``)

    Fetching external sources
    -> Fetching podspec for `Flutter` from `Flutter`
    -> Fetching podspec for `sqflite` from `.symlinks/plugins/sqflite/ios`

    Resolving dependencies of `Podfile`
      CDN: trunk Relative path: CocoaPods-version.yml exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: all_pods_versions_f_4_e.txt exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/f/4/e/FMDB/2.7.5/FMDB.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/f/4/e/FMDB/2.7.5/FMDB.podspec.json exists! Returning local because checking is only perfomed in repo update
      CDN: trunk Relative path: Specs/f/4/e/FMDB/2.7.5/FMDB.podspec.json exists! Returning local because checking is only perfomed in repo update

    Comparing resolved specification to the sandbox manifest
      A FMDB
      A Flutter
      A sqflite

    Downloading dependencies

    -> Installing FMDB (2.7.5)
      > Copying FMDB from `/Users/hogehoge/Library/Caches/CocoaPods/Pods/Release/FMDB/2.7.5-2ce00` to `Pods/FMDB`

    -> Installing Flutter (1.0.0)

    -> Installing sqflite (0.0.2)
      - Running pre install hooks

    Generating Pods project
      - Creating Pods project
      - Installing files into Pods project
        - Adding source files
        - Adding frameworks
        - Adding libraries
        - Adding resources
        - Adding development pod helper files
        - Linking headers
      - Installing Pod Targets
        - Installing target `FMDB` iOS 8.0
          - Generating module map file at `Pods/Target Support Files/FMDB/FMDB.modulemap`
          - Generating umbrella header at `Pods/Target Support Files/FMDB/FMDB-umbrella.h`
          - Generating Info.plist file at `Pods/Target Support Files/FMDB/FMDB-Info.plist`
          - Generating dummy source at `Pods/Target Support Files/FMDB/FMDB-dummy.m`
        - Installing target `Flutter` iOS 8.0
        - Installing target `sqflite` iOS 9.0
          - Generating module map file at `Pods/Target Support Files/sqflite/sqflite.modulemap`
          - Generating umbrella header at `Pods/Target Support Files/sqflite/sqflite-umbrella.h`
          - Generating Info.plist file at `Pods/Target Support Files/sqflite/sqflite-Info.plist`
          - Generating dummy source at `Pods/Target Support Files/sqflite/sqflite-dummy.m`
      - Installing Aggregate Targets
        - Installing target `Pods-Runner` iOS 12.0
          - Generating Info.plist file at `Pods/Target Support Files/Pods-Runner/Pods-Runner-Info.plist`
          - Generating module map file at `Pods/Target Support Files/Pods-Runner/Pods-Runner.modulemap`
          - Generating umbrella header at `Pods/Target Support Files/Pods-Runner/Pods-Runner-umbrella.h`
          - Generating dummy source at `Pods/Target Support Files/Pods-Runner/Pods-Runner-dummy.m`
      - Generating deterministic UUIDs
      - Stabilizing target UUIDs
      - Running post install hooks
    [!] An error occurred while processing the post-install hook of the Podfile.

    undefined method `each_child' for #<Dir:0x00007f82a7993988>
    Did you mean?  each_slice

# 中略

Error output from CocoaPods:
↳

    [!] Automatically assigning platform `iOS` with version `12.0` on target `Runner` because no platform was specified. Please specify a platform for this target in your Podfile. See `https://guides.cocoapods.org/syntax/podfile.html#platform`.

Error running pod install
Error launching application on iPhone 12 Pro Max.
  • undefined method `each_child' for #<Dir:0x00007f82a7993988>
  • Did you mean? each_slice

rubyのバージョン上げた

issue見た感じバージョンの問題ぽかったのでrubyのバージョンを2.5.5→2.7.1に上げた github.com

rbenv install -l
rbenv install 2.7.1
rbenv global 2.7.1

flutterを2.0に上げたことが原因かは分からんがとりあえずこれでflutter runいけた