简体   繁体   中英

ERROR: Could not find a valid gem 'cocoapods' (>= 0) in any repository

i am trying to run a AWS Cognito service project in which i have added the AWS SDK for iOS but after adding it and trying to run it it shows me the below shown error in the image

ERROR: Could not find a valid gem 'cocoapods' (>= 0) in any repository

when i crawl it on internet and found some cocoapods install instructions so after trying that i got some other error like below

aparajita:Objective-C Aparajita$ sudo gem install cocoapods
Password:
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin14/rbconfig.rb:213: warning: Insecure world writable dir /usr/local in PATH, mode 040777
ERROR:  Could not find a valid gem 'cocoapods' (>= 0) in any repository
aparajita:Objective-C Aparajita$ gem install cocoapods
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin14/rbconfig.rb:213: warning: Insecure world writable dir /usr/local in PATH, mode 040777
ERROR:  Could not find a valid gem 'cocoapods' (>= 0) in any repository
aparajita:Objective-C Aparajita$ gem source -a http://rubygems.org/
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin14/rbconfig.rb:213: warning: Insecure world writable dir /usr/local in PATH, mode 040777
https://rubygems.org is recommended for security over http://rubygems.org/

Do you want to add this insecure source? [yn]  y
Error fetching http://rubygems.org/:
no such name (http://rubygems.org/specs.4.8.gz)
aparajita:Objective-C Aparajita$ gem source -a rubygems.org
 /System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin14/rbconfig.rb:213: warning: Insecure world writable dir /usr/local in PATH, mode 040777
rubygems.org is not a URI
aparajita:Objective-C Aparajita$ gem source -r rubygems.org
/System/Library/Frameworks/Ruby.framework/Versions/2.0/usr/lib/ruby/2.0.0/universal-darwin14/rbconfig.rb:213: warning: Insecure world writable dir /usr/local in PATH, mode 040777
source rubygems.org not present in cache

i have tried it all but still above log i got from the console. if any one have any solution on this please let me know, thanks

I am facing the same problem and I resolved it by issuing using the following command

sudo gem install cocoapods --source http://rubygems.org

在此处输入图像描述

OK, I just had this problem. If anyone seems to have this problem DO NOT change directories.

Load up terminal and straight away add the line -

sudo gem install cocoapods

Worked for me.

I struggled with same issue 1 week, finally this works for me

Disable IPv6 and try again with sudo gem install cocoapods --source http://rubygems.org

Issues seems with network

Few more details give on rugby gems forum - https://help.rubygems.org/discussions/problems/31074-timeout-error

This command worked for me

  sudo gem install cocoapods --source http://rubygems.org

In my case I used VPN, because http://rubygems.org was unavailable, as soon as I switched the VPN on sudo gem install cocoapods worked

Make sure you have Xcode installed in your Mac. After opening for the first time you need to accept the Terms & Condition and may need to install some components. Once it is setup and working, then install Pod:

sudo gem install cocoapods

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM