CocoaPods 1.2.0 にバージョンアップしたら"LoadError - cannot load such file -- nanaimo"に遭遇した話

まあせっかくだからQiitaに書いとけ、的な？

## やったこと


`cocoapods`のバージョンアップ

```
$ sudo gem update cocoapods
```

リポジトリの初期化
```
$ pod setup
```

元からPodfileはあるので`pod init`は省略。

```
$ pod install
```

下記のエラーに遭遇。バグ報告用のテンプレート部分は省略。

```
LoadError - cannot load such file -- nanaimo
/Library/Ruby/Gems/2.0.0/gems/xcodeproj-1.4.1/lib/xcodeproj/plist.rb:23:in `read_from_path'
/Library/Ruby/Gems/2.0.0/gems/xcodeproj-1.4.1/lib/xcodeproj/project.rb:200:in `initialize_from_file'
/Library/Ruby/Gems/2.0.0/gems/xcodeproj-1.4.1/lib/xcodeproj/project.rb:102:in `open'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer/analyzer.rb:851:in `block (2 levels) in inspect_targets_to_integrate'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer/analyzer.rb:850:in `each'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer/analyzer.rb:850:in `block in inspect_targets_to_integrate'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer/analyzer.rb:845:in `inspect_targets_to_integrate'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer/analyzer.rb:66:in `analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer.rb:236:in `analyze'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer.rb:150:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer.rb:149:in `resolve_dependencies'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/installer.rb:110:in `install!'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/command/install.rb:37:in `run'
/Library/Ruby/Gems/2.0.0/gems/claide-1.0.1/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.0.0/gems/cocoapods-1.2.0/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'
```

## 原因と対処方法


`Nanaimo`というgemが複数入っているとなぜかうまくロードできない。

[LoadError - cannot load such file -- nanaimo · Issue #6214 · CocoaPods/CocoaPods · GitHub](https://github.com/CocoaPods/CocoaPods/issues/6214)  

対処方法としては、古いgemを消すだけ。同じgemが複数存在する場合はどれを消すか訊いてくるので、番号を入力する。

```
$ sudo gem uninstall nanaimo

Select gem to uninstall:
 1. nanaimo-0.2.2
 2. nanaimo-0.2.3
 3. All versions
> 1
Successfully uninstalled nanaimo-0.2.2
```




## 以下、参考

遭遇したバージョンの情報など。

### Stack

```
   CocoaPods : 1.2.0
        Ruby : ruby 2.0.0p648 (2015-12-16 revision 53162) [universal.x86_64-darwin16]
    RubyGems : 2.0.14.1
        Host : Mac OS X 10.12.4 (16E195)
       Xcode : 8.3 (8E162)
         Git : git version 2.12.0
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 55bace3431005a17ad28d49fd9301c4d4a3531d6
```

### Plugins

```
cocoapods-deintegrate : 1.0.1
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.0.0
cocoapods-trunk       : 1.1.2
cocoapods-try         : 1.1.0
```

## おしまい

以上です。