ruby 安装 CocoaPods:无响应

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/14355165/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-06 05:39:25  来源:igfitidea点击:

Installing CocoaPods: no response

rubyrubygemscocoapods

提问by Pierre de LESPINAY

Trying to install CocoaPods from the terminal:

尝试从终端安装 CocoaPods:

$ sudo gem install cocoapods

After entering my root password, nothing happens.

输入我的root密码后,没有任何反应。

How can I debug that?

我该如何调试?

回答by Alex

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

对于其他有同样疑问的人来说,安装 gem 需要很长时间。如果你运行:

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

gem install cocoapods -V

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

使用标志安装V可以启用详细输出,它可以让您在下载和安装过程中看到所有输出,它相当多。

回答by Hulvej

update gem to the newest release using

使用更新 gem 到最新版本

sudo gem update --systemand it should work a bit faster

sudo gem update --system它应该工作得更快一点

回答by Pierre de LESPINAY

I had to wait at least 5 minutes before:

我不得不等待至少 5 分钟前:

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

构建原生扩展。这可能需要一段时间...

Appears

出现

回答by Dakshay Dandekar

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

回答by Sachin Nikumbh

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

它没有卡住,它正在从互联网下载 ruby​​ 文件。您可以按照以下步骤进行检查:

  1. Open Activity Monitor

  2. Select Networkoption

  3. Check below Google Chrome. (rubydownloading)

  1. 打开活动监视器

  2. 选择网络选项

  3. 检查下面的谷歌浏览器。(红宝石下载

enter image description here

在此处输入图片说明

回答by Harsh Thakker

Try Installing latest Git version from

尝试安装最新的 Git 版本

https://git-scm.com/downloads

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
  1. export GEM_HOME=~/.gems
  2. export PATH=$GEM_HOME/bin:$PATH
  3. gem install cocoapods
  4. 使用命令设置项目的路径 cd path/to/project
  5. pod init
  6. 打开 podfile
  7. 添加合适的 pod
  8. pod install