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
Installing CocoaPods: no response
提问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
回答by Harsh Thakker
Try Installing latest Git version from
尝试安装最新的 Git 版本
This worked for me
这对我有用
Write the following commands in Terminal:
在终端中编写以下命令:
export GEM_HOME=~/.gemsexport PATH=$GEM_HOME/bin:$PATHgem install cocoapods- Set the path of the project with the command
cd path/to/project pod init- Open podfile
- Add appropriate pod
pod install
export GEM_HOME=~/.gemsexport PATH=$GEM_HOME/bin:$PATHgem install cocoapods- 使用命令设置项目的路径
cd path/to/project pod init- 打开 podfile
- 添加合适的 pod
pod install


