Cocoapods installation error in terminal

2019-03-05 17:29发布

问题:

While trying to install cocoapods I'm getting the following error, can any one help me debug it?

MacBook-Pro:~ saiteja$ sudo gem install cocoapods
Password:
ERROR:  Error installing cocoapods:
    activesupport requires Ruby version >= 2.2.2.
MacBook-Pro:~ saiteja$ 

回答1:

sudo gem install activesupport -v 4.2.6



回答2:

First install an old version of 'activesupport' (which is both compatible with ruby 2.0 and with cocoapods) and then install cocoapods. $ sudo gem install activesupport -v 4.2.6



回答3:

This was issue exactly faced by me. First you need install active script :

sudo gem install activesupport -v 4.2.6
sudo gem install -n /usr/local/bin cocoapods