Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 951
Surya Avatar asked Jan 14 '16 08:01

Surya


1 Answers

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

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

enter image description here

like image 178
pansora abhay Avatar answered Oct 16 '22 10:10

pansora abhay