0

When I enter the 'sudo gem install cocoapods' command, I see 'Error installing cocoapods: The last version of activesupport (>= 5.0, < 8) to support your Ruby & RubyGems was 6.1.7.6. Try installing it with gem install activesupport -v 6.1.7.6 and then running the current command again activesupport requires Ruby version >= 2.7.0. The current ruby ​​version is 2.6.10.210.' error pops up, I couldn't find the solution

I tried updating Ruby

1 Answer 1

0

You can resolve this issue by upgrading your Ruby version. Here's how you can do it using rbenv, a popular Ruby version management tool:

  1. First, update rbenv and the ruby-build plugin:

    brew update

    brew upgrade rbenv ruby-build

  2. Install the latest stable version of Ruby:

    rbenv install 3.3.0

  3. Set the newly installed version as the global default:

    rbenv global 3.3.0

  4. Verify that the correct version is being used:

    ruby -v

After upgrading Ruby, you should be able to install cocoapods without encountering the activesupport error.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.