LoginSignup
5
2

More than 5 years have passed since last update.

cocoapods をインストール(エラーに対応)

Posted at

MACにインストールする時の備忘録
cocoapodsをインストールしようと思ったらエラーになった

$ gem install cocoapods
Fetching: i18n-0.7.0.gem (100%)
ERROR:  While executing gem ... (Gem::FilePermissionError)
    You don't have write permissions for the /Library/Ruby/Gems/2.0.0 directory.

パーミッションエラーがだね
ディレクトリの書き換え権限がないってこと

で、どうするかというと
sudo
コマンドを使います
これは Super User DO の略らしい
スーパーユーザとして命令しますってこと
したのようにパスワードが聞かれるから入力してあげると。。

$ sudo gem install cocoapods
Password:
Fetching: i18n-0.7.0.gem (100%)
Successfully installed i18n-0.7.0
Fetching: thread_safe-0.3.5.gem (100%)
Successfully installed thread_safe-0.3.5
Fetching: tzinfo-1.2.2.gem (100%)
Successfully installed tzinfo-1.2.2
Fetching: minitest-5.9.0.gem (100%)
Successfully installed minitest-5.9.0
Fetching: concurrent-ruby-1.0.2.gem (100%)
Successfully installed concurrent-ruby-1.0.2
Fetching: activesupport-5.0.0.1.gem (100%)
ERROR:  Error installing cocoapods:
    activesupport requires Ruby version >= 2.2.2.

このようにできた。

5
2
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
5
2