Installing CocoaPods: no response

折月煮酒 提交于 2019-11-26 23:58:43

问题


Trying to install CocoaPods from the terminal:

$ sudo gem install cocoapods

After entering my root password, nothing happens.

How can I debug that?


回答1:


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.




回答2:


update gem to the newest release using

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




回答3:


I had to wait at least 5 minutes before:

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

Appears




回答4:


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



回答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)




回答6:


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


来源:https://stackoverflow.com/questions/14355165/installing-cocoapods-no-response

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!