0
0

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 3 years have passed since last update.

pod try RxSwift できない!

Last updated at Posted at 2020-05-09

はじめに

.swift
pod try RxSwift 

打っても以下のようなエラーが出てしまったのを解決したの記事です。
誰も書いていないようだったので書きました!
やっぱりサンプルみてみた〜〜〜いってなりまして、、、

ちなみに何が行けなかったのかというとRubyのバージョンでうまくいかないものがあるようでした。
現在の最新版ではうまくいかないようです。
なので直すというとちょっと違うのかな〜〜とか思ったり思わなかったりという感じです。
一番いいのはcocoapodが動くようにRubyを修正してもらうか、新しいRubyでも動くようにcocoapodを修正してもらうかだと思っています。

ただそんなのいつになるかわからないので、、、といった感じで、、、、

以下はそれを表すエラー内容

### Error

NoMethodError - undefined method `root' for false:FalseClass
/Users/***/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/pod_source_installer.rb:179:in `root_spec'
/Users/***/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/pod_source_installer.rb:192:in `predownloaded?'
/Users/***/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/cocoapods-1.9.1/lib/cocoapods/installer/pod_source_installer.rb:69:in `install!'
/Users/***/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/cocoapods-try-1.1.0/lib/pod/command/try.rb:139:in `install_pod'
/Users/***/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/cocoapods-try-1.1.0/lib/pod/command/try.rb:50:in `block in run'
/Users/***/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/cocoapods-1.9.1/lib/cocoapods/user_interface.rb:118:in `title'
/Users/***/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/cocoapods-try-1.1.0/lib/pod/command/try.rb:49:in `run'
/Users/***/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Users/***/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/cocoapods-1.9.1/lib/cocoapods/command.rb:52:in `run'
/Users/***/.rbenv/versions/2.4.1/lib/ruby/gems/2.4.0/gems/cocoapods-1.9.1/bin/pod:55:in `<top (required)>'
/Users/***/.rbenv/versions/2.4.1/bin/pod:22:in `load'
/Users/***/.rbenv/versions/2.4.1/bin/pod:22:in `<main>'

なおす方法

  • まず現在のバージョンを調べます。2.4.1とかだったら同じですね!
$ rbenv versions
  • バージョンを変えます。とりあえずsystemに設定しました!
$ rbenv local system
  • cocoapodsのインストールをし直します。
$ sudo gem install cocoapods
  • cocoapodsのsetupをし直します。
$ pod setup
  • これで大丈夫なので好きなプロジェクトでコマンド叩きます!
$ pod try RxSwift

でどんなだったか写真

スクリーンショット 2020-05-09 19.54.22.png スクリーンショット 2020-05-09 19.54.31.png スクリーンショット 2020-05-09 19.55.21.png

最後に

終わりです!!

0
0
0

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
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?