SolvedCocoaPods pod install: [!] Oh no, an error occurred.

Report

[!] Oh no, an error occurred.

What did you do?

Run pod install

What did you expected to happen?

Install all pod dependencies correctly.

What happened instead?

Stack

   CocoaPods : 0.39.0
        Ruby : ruby 2.3.0p0 (2015-12-25 revision 53290) [x86_64-darwin15]
    RubyGems : 2.6.4
        Host : Mac OS X 10.11.4 (15E65)
       Xcode : 7.3 (7D175)
         Git : git version 2.6.4
Ruby lib dir : /Users/kyo.l/.rvm/rubies/ruby-2.3.0/lib
Repositories : master - https://github.com/CocoaPods/Specs.git @ 07d2d5843ccf529251cef7209654ddc7753e5de3

Plugins

cocoapods-plugins : 0.4.2
cocoapods-search  : 0.1.0
cocoapods-stats   : 0.6.2
cocoapods-trunk   : 0.6.4
cocoapods-try     : 0.5.1

Podfile

source source 'https://github.com/CocoaPods/Specs.git'
platform :ios, '8.0'
pod 'GoogleMaps'

target 'photomap' do

end

target 'photomapTests' do

end

target 'photomapUITests' do

end

Error

NoMethodError - undefined method `downcase' for ["https://github.com/CocoaPods/Specs.git", [...]]:Array
/Users/kyo.l/.rvm/gems/ruby-2.3.0/gems/cocoapods-0.39.0/lib/cocoapods/sources_manager.rb:418:in `source_with_url'
/Users/kyo.l/.rvm/gems/ruby-2.3.0/gems/cocoapods-0.39.0/lib/cocoapods/sources_manager.rb:38:in `find_or_create_source_with_url'
/Users/kyo.l/.rvm/gems/ruby-2.3.0/gems/cocoapods-0.39.0/lib/cocoapods/installer/analyzer.rb:620:in `block in sources'
/Users/kyo.l/.rvm/gems/ruby-2.3.0/gems/cocoapods-0.39.0/lib/cocoapods/installer/analyzer.rb:619:in `map'
/Users/kyo.l/.rvm/gems/ruby-2.3.0/gems/cocoapods-0.39.0/lib/cocoapods/installer/analyzer.rb:619:in `sources'
/Users/kyo.l/.rvm/gems/ruby-2.3.0/gems/cocoapods-0.39.0/lib/cocoapods/installer.rb:129:in `resolve_dependencies'
/Users/kyo.l/.rvm/gems/ruby-2.3.0/gems/cocoapods-0.39.0/lib/cocoapods/installer.rb:105:in `install!'
/Users/kyo.l/.rvm/gems/ruby-2.3.0/gems/cocoapods-0.39.0/lib/cocoapods/command/project.rb:71:in `run_install_with_update'
/Users/kyo.l/.rvm/gems/ruby-2.3.0/gems/cocoapods-0.39.0/lib/cocoapods/command/project.rb:101:in `run'
/Users/kyo.l/.rvm/gems/ruby-2.3.0@global/gems/claide-0.9.1/lib/claide/command.rb:312:in `run'
/Users/kyo.l/.rvm/gems/ruby-2.3.0/gems/cocoapods-0.39.0/lib/cocoapods/command.rb:47:in `run'
/Users/kyo.l/.rvm/gems/ruby-2.3.0/gems/cocoapods-0.39.0/bin/pod:44:in `<top (required)>'
/Users/kyo.l/.rvm/gems/ruby-2.3.0/bin/pod:22:in `load'
/Users/kyo.l/.rvm/gems/ruby-2.3.0/bin/pod:22:in `<main>'
/Users/kyo.l/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval'
/Users/kyo.l/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'
22 Answers

โœ”๏ธAccepted Answer

This was what worked for me - arch -x86_64 pod install

Other Answers:

I solved it.
It would has worked for me to re-install cocoapods , like this command sudo gem install cocoapods.

If nothing works, delete pods folder and then just run pod install in the directory

source source 'https://github.com/CocoaPods/Specs.git' <- here

  1. Simply delete the Podfile from your project
  2. Run this command in terminal sudo gem install cocoapods
  3. And pod init
    It works for me..

More Issues: