4
1

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 1 year has passed since last update.

Qiita全国学生対抗戦Advent Calendar 2023

Day 3

[Unity] iOS Resolver にて 不幸にも Failed to install CocoaPods となってしまう。実際はCocoapods が入っているのに.

Posted at

問題

m3 mac の Unity にて

iOS Resolver > Install Cocoapods としたときに

以下の現象が発生。

WARNING:  You don't have /Users/USER_NAME/.gem/ruby/2.6.0/bin in your PATH,
	  gem executables will not run.
ERROR:  Error installing cocoapods:
	The last version of drb (>= 0) to support your Ruby & RubyGems was 2.0.5. Try installing it with `gem install drb -v 2.0.5` and then running the current command again
	drb requires Ruby version >= 2.7.0. The current ruby version is 2.6.10.210.

...まずうちさぁ、Flutter の初期設定で既に Cocoapods 入れてるんですが。どうなってんのこれ。

terminal に連絡させてもらうね?

which ruby
>>> /Users/USER_NAME/.rbenv/shims/ruby
which gem
>>> /Users/USER_NAME/.rbenv/shims/gem

うーむ。。。しかもRuby のバージョンは2.6なんかとっくに超えてるし。。。

 ruby -v   
ruby 3.1.4p223 (2023-03-30 revision 957bb7cb81) [arm64-darwin23]

ファ!?もしかして、homebrew 経由で Cocoapods を入れたことが問題だった??

解決

てわけで、gem を使って、パス指定しつつ、cocoapods をぶち込んでやるよ。

sudo gem install -n /usr/local/bin cocoapods
>>> Successfully installed cocoapods-1.14.3

Screenshot 2023-11-24 at 18.46.32.png

あーいいっすねぇ。

4
1
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
4
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?