22
20

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

【詳解付き】【Podfile】pod installが途中で動かなくなる問題から解決まで

Last updated at Posted at 2015-11-07

事象

「Realm」を使おうと、「Podfile」の作成および、pod installを実行したところ、以下のような表示でフリーズして
動かない(1分経っても、10分経っても先に進まない。)という
事象が起きました。


g08m11:work$ pod install
Updating local specs repositories


原因調査から解決まで

1.pod helpでデバッグ出来そうなオプションが無いか探す。

g08m11:work$ pod --help
Usage:

    $ pod COMMAND

      CocoaPods, the Cocoa library package manager.

Commands:

    + cache      Manipulate the CocoaPods cache
    + init       Generate a Podfile for the current directory.
    + install    Install project dependencies to Podfile.lock versions
    + ipc        Inter-process communication
    + lib        Develop pods
    + list       List pods
    + outdated   Show outdated project dependencies
    + plugins    Show available CocoaPods plugins
    + repo       Manage spec-repositories
    + search     Searches for pods
    + setup      Setup the CocoaPods environment
    + spec       Manage pod specs
    + trunk      Interact with the CocoaPods API (e.g. publishing new specs)
    + try        Try a Pod!
    + update     Update outdated project dependencies and create new Podfile.lock

Options:

    --silent     Show nothing
    --version    Show the version of the tool
    --verbose    Show more debugging information
    --no-ansi    Show output without ANSI codes
    --help       Show help banner of specified command

2.「--verbose」オプションを使ってdebugging。

g08m11:work$ pod install --verbose
  Preparing

Updating local specs repositories

Updating spec repo `master`
  $ /usr/bin/git pull --ff-only

CocoaPodsのSpecsを最新にするためのgit pullで止まっている。
そのため、「repo」コマンドを使って今あるSpecsを削除する。


g08m11:work$ pod repo remove master
Removing spec repo `master`


g08m11:work$ 

3.「set up」コマンドを使って新しくCocoaPods環境のセットアップを行う。

g08m11:work$ pod setup
Setting up CocoaPods master repo

CocoaPods 0.39.0 is available.
To update use: `gem install cocoapods`
Until we reach version 1.0 the features of CocoaPods can and will change.
We strongly recommend that you use the latest version at all times.

For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.

Setup completed

4.再度、「install」コマンドを使ってインストールを行う。

g08m11:work$ pod install

Updating local specs repositories

CocoaPods 0.39.0 is available.
To update use: `gem install cocoapods`
Until we reach version 1.0 the features of CocoaPods can and will change.
We strongly recommend that you use the latest version at all times.

For more information see http://blog.cocoapods.org
and the CHANGELOG for this version http://git.io/BaH8pQ.

Analyzing dependencies
Downloading dependencies
Installing Realm (0.96.2)
Generating Pods project
Integrating client project
Sending stats
g08m11:work$ pod setup

5.「list」コマンドを使ってインストールしたかった「Realm」および「Realm」関連のライブラリが入ってるか確認する。

g08m11:work$ pod list | grep -i 'Realm'
  ABFRealmGridController 1.4.1
  ABFRealmMapView 1.6.3
  ABFRealmSearchViewController 1.4
  ABFRealmTableViewController 1.3
  ARNRealmExtension 0.1.0
  MRRealmResultsController 0.0.1
  MultiRealm 0.3.4
  NBNRealmBrowser 0.3.0
  RBQSafeRealmObject 0.6
  Realm 0.96.2
  Realm+JSON 0.2.11
  Realm-Rest 2.1.0
  RealmBlogData 1.0
  RealmGridController 1.4.1
  RealmMapView 1.6.3
  RealmMeteor 0.1.5
  RealmNYTStories 1.1
  RealmResultsController 0.2.3
  RealmSFRestaurantData 0.3
  RealmSearchViewController 1.4
  RealmSubqueryHelper 0.0.1
  RealmSwift 0.96.2
  RealmSwiftBlogData 1.0
  RealmSwiftNYTStories 1.1
  RealmSwiftSFRestaurantData 0.4.1
  RealmTableViewController 1.3
  RealmUtilities 0.3
  SMWRealm 0.1.1
  SafeRealmObject 0.6
  YSRealmStore 0.8.2
g08m11:work$ 

これからRealmを使ってのアプリ開発頑張ります!

22
20
1

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
22
20

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?