Fiona Luke
Fiona Luke

Reputation: 1

Trying to install flutter by first following instructions to install cocopods on Mac Studio with macOS Sonoma version 14.5

Trying to install flutter by first following instructions to install cocoapods on Mac Studio with macOS Sonoma version 14.5 and there was an error:

ERROR:  Error installing cocoapods:
    The last version of securerandom (>= 0.3) to support your Ruby & RubyGems was 0.3.2. Try installing it with `gem install securerandom -v 0.3.2` and then running the current command again
    securerandom requires Ruby version >= 3.1.0. The current ruby version is 2.6.10.210.

tried this command

% brew install ruby
zsh: command not found: brew

So what's the command for securerandom requires Ruby version >= 3.1.0.

tried this command

% brew install ruby
zsh: command not found: brew

So what's the command for securerandom requires Ruby version >= 3.1.0.

Upvotes: 0

Views: 296

Answers (2)

IanF
IanF

Reputation: 1

I had exactly the same error when trying to install cocoapods using the official instructions.
Trying to install ruby via brew wasn't much use either. What worked for me was brew install cocoapods

Upvotes: 0

Gabriel Lidenor
Gabriel Lidenor

Reputation: 2985

it looks like you don't have brew installed in your mac, that's why you are receiving: zsh: command not found: brew

Please follow the steps bellow to install all the required libs before installing Flutter.

1 - brew is a package manager for mac, and you don't have it installed, please follow these steps to install it.

2 - with brew you should install rbenv by running this command brew install rbenv

3 - with rbenv you should be able to install the required ruby version, please use rbenv install 3.1.0

4 - then run this command rbenv local 3.1.0 this will set ruby 3.1.0 in your local path

5 - then you can install cocoapods by running gem install cocoapods

With all those steps you should be able to have your environment ready for installing Flutter. Make sure to follow the steps properly and read all information the commands return to you.

Upvotes: 0

Related Questions