Cocoapods: The min required version of ruby needed to install cocoapads in wrong on the gem site

Created on 7 Jul 2016  路  9Comments  路  Source: CocoaPods/CocoaPods

Report

What did you do?

I attempted to install cocoapods.
Run sudo gem install cocoapods

What did you expect to happen?

I expected the cocoapods to installed.

What happened instead?

Terminal output:
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.

I have ruby 2.0.0 on my computer, which is the minimum required version listed on the gem website.

Most helpful comment

I think the easiest workaround is actually installing version 4.2.6 of activesupport manually:

$ sudo gem install activesupport -v 4.2.6
$ sudo gem install cocoapods

I wouldn't advise upgrading rubygems necessarily, because it breaks the default binary directory customisation Apple puts into the default one, then peeps need to append -n /usr/local/bin to any install.

All 9 comments

Aye, alas this is a bug with the system rubygems - we have a fix #5602 - for now you should not consider looking at gem update --system or use the Mac App.

I think the easiest workaround is actually installing version 4.2.6 of activesupport manually:

$ sudo gem install activesupport -v 4.2.6
$ sudo gem install cocoapods

I wouldn't advise upgrading rubygems necessarily, because it breaks the default binary directory customisation Apple puts into the default one, then peeps need to append -n /usr/local/bin to any install.

Thanks for the help! I discovered this issue while helping a friend install cocoapods. He ended up installing a newer version of ruby, and everything seemed to work fine, but I will keep those these other optioned in mind.

Thanks again!

Fix has been merged.

Thanks @neonichu,

sudo gem install activesupport -v 4.2.6
sudo gem install cocoapods

fixes this for me. Maybe add that to

https://guides.cocoapods.org/using/troubleshooting#installing-cocoapods

?

Thanks @neonichu

i face "xcodeproj requires Ruby version >= 2.0.0." error during install cocoapod.

please tell me about this problem and let me know how to resolve it.

Nitesh

@NiteshKhandal would you mind filing a new issue and fully filling out the issue template? If you could do that, we'd be happy to help!

Was this page helpful?
0 / 5 - 0 ratings