title: ERROR: Could not find a valid gem 'cocoapods' (>= 0) in any repository
body: <p>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</p>
  
  <p><a href="http://i.stack.imgur.com/DJUDC.png" rel="noreferrer">ERROR:  Could not find a valid gem 'cocoapods' (>= 0) in any repository</a></p>
  
  <p>when i crawl it on internet and found some cocoapods install instructions so after trying that i got some other error like below </p>
  
  <pre><code>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' (&gt;= 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' (&gt;= 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
  </code></pre>
  
  <p>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</p>