我正在尝试安装最新的 CocoaPods(当前版本为1.0.1),但出现以下错误。
$ 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.gem (100%)
ERROR: Error installing cocoapods:
activesupport requires Ruby version >= 2.2.2.
安装指南上说,cocoapods可以使用macOS自带的Ruby进行安装。如果你不熟悉Ruby版本管理器,我们建议你使用macOS自带的标准Ruby进行安装。如果你对这方面比较了解,也可以使用Ruby版本管理器进行安装。由于我不太熟悉Ruby语言,所以请问有谁能帮忙告诉我如何安装cocoapods gem呢?我的操作系统版本是OS X El Capitan 10.11.5。