191

Trying to install CocoaPods from the terminal:

$ sudo gem install cocoapods

After entering my root password, nothing happens.

How can I debug that?

Cœur
  • 37,241
  • 25
  • 195
  • 267
Pierre de LESPINAY
  • 44,700
  • 57
  • 210
  • 307

8 Answers8

411

For others wondering the same, installing the gem takes forever. If you run:

export GEM_HOME=~/.gems
export PATH=$GEM_HOME/bin:$PATH

gem install cocoapods -V

Installing with flag V enables verbose output which will let you see all the output as it is going through the download and install, it's quite a lot.

Iulian Onofrei
  • 9,188
  • 10
  • 67
  • 113
Alex
  • 4,744
  • 2
  • 17
  • 21
54

update gem to the newest release using

sudo gem update --system and it should work a bit faster

Hulvej
  • 3,895
  • 1
  • 18
  • 21
29

I had to wait at least 5 minutes before:

Building native extensions. This could take a while...

Appears

Pierre de LESPINAY
  • 44,700
  • 57
  • 210
  • 307
5

It's not stuck, it's downloading file for ruby from the internet. you can check this by following below steps:

  1. Open Activity Monitor

  2. Select Network option

  3. Check below Google Chrome. (ruby downloading)

enter image description here

Cœur
  • 37,241
  • 25
  • 195
  • 267
Sachin Nikumbh
  • 911
  • 11
  • 11
2

You should do it in two separated commands:

First:

gem update

Then:

export GEM_HOME=~/.gems
export PATH=$GEM_HOME/bin:$PATH

gem install cocoapods
Iulian Onofrei
  • 9,188
  • 10
  • 67
  • 113
0

Try Installing latest Git version from

https://git-scm.com/downloads

This worked for me

Write the following commands in Terminal:

  1. export GEM_HOME=~/.gems
  2. export PATH=$GEM_HOME/bin:$PATH
  3. gem install cocoapods
  4. Set the path of the project with the command cd path/to/project
  5. pod init
  6. Open podfile
  7. Add appropriate pod
  8. pod install
Iulian Onofrei
  • 9,188
  • 10
  • 67
  • 113
0

Yes it takes forever keep calm and wait for at least 5 minutes , then you will see something, I did that in Ventura 13, I had to wait for 10 minutes. Hope this is helps, its like "light at the end of the tunnel".

0

I received an error: "Error installing cocoapods: The last version of activesupport (>= 5.0, < 8) to support your Ruby & RubyGems was 6.1.7.3. Try installing it with gem install activesupport -v 6.1.7.3 and then running the current command again activesupport requires Ruby version >= 2.7.0. The current ruby version is 2.6.10.210."

So, I had to run 'sudo gem install activesupport -v 6.1.7.3', for Ventura 13

Giovanni
  • 512
  • 2
  • 6
  • 23