CocoaPods / CocoaPods

The Cocoa Dependency Manager.

Home Page:https://cocoapods.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

:memo: specify the version of ruby required so that users on older versions of MacOS are not confused

shankari opened this issue · comments

Report

What did you do?

ℹ Please replace these two lines with what you did.
Searched for "cocoapods ruby version"

What did you expect to happen?

I would find a document that indicated that the current ruby version required to install CocoaPods was "x.y.z"

What happened instead?

ℹ Please replace these two lines with of what happened instead.

I found these instructions
https://guides.cocoapods.org/using/getting-started.html#getting-started

CocoaPods is built with Ruby and it will be installable with the default Ruby available on macOS. You can use a Ruby Version manager, however we recommend that you use the standard Ruby available on macOS unless you know what you're doing.


The previous statement is only true if you are on a recent version of MacOS. I am currently two versions back (Big Sur), but this was failing for me even last year when I was only one version back. It seems like a frequently asked question and adding some documentation on the lines of the following might be helpful.

"If you are on an older version of Mac OSX, your ruby version might be too old. CocoaPods requires a minimum of ruby-2.6. You should upgrade your version of OSX. If you cannot upgrade and know what you are doing, you can use a ruby version manager to install a more recent version".

If the maintainers are generally supportive of this change, I am happy to submit a PR.
This will hopefully reduce the incidence of issues similar to:
#11646 and
#11646

Note also that the macos-latest label on GitHub just recently switched to OSX 12. (actions/runner-images#6384)
Screen Shot 2023-02-10 at 12 43 03 PM

Before this the latest version was OSX 11 (Big Sur).
However, GitHub actions does use brew to install ruby 3 (https://github.com/e-mission/e-mission-phone/actions/runs/4146231523/jobs/7171625257)

Screen Shot 2023-02-10 at 12 40 34 PM

So people on older versions of OSX that are trying to install CocoaPods because they want to use projects that use them, are likely to find that the CI works for their version of OSX, but their install fails.