Cocoapods: [!] Couldn't determine repo type for URL: `https://cdn.cocoapods.org/`: uninitialized constant Pod::Source::Manager::REST

Created on 19 Oct 2019  路  8Comments  路  Source: CocoaPods/CocoaPods

hi, pod install not work, the follow message was output

pod install
Analyzing dependencies
[!] Couldn't determine repo type for URL: https://cdn.cocoapods.org/: uninitialized constant Pod::Source::Manager::REST

Did you mean? Rest

my pod env result is:

Stack

   CocoaPods : 1.8.4
        Ruby : ruby 2.6.3p62 (2019-04-16 revision 67580) [universal.x86_64-darwin19]
    RubyGems : 3.0.3
        Host : Mac OS X 10.15 (19A602)
       Xcode : 11.1 (11A1027)
         Git : git version 2.22.0
Ruby lib dir : /System/Library/Frameworks/Ruby.framework/Versions/2.6/usr/lib
Repositories :

Installation Source

Executable Path: /usr/local/bin/pod

Plugins

cocoapods-deintegrate : 1.0.4
cocoapods-plugins     : 1.0.0
cocoapods-search      : 1.0.0
cocoapods-stats       : 1.1.0
cocoapods-trunk       : 1.4.1
cocoapods-try         : 1.1.0

awaiting input

Most helpful comment

I have the same problem锛孖t seem the CDN is not work very well. Ping cdn.cocoapod.org. Most of China's City is timeout. I use the vpn in global mode, Then, Use "sudo dscacheutil -flushcache" command to refresh DNS cache. Now , It install succeed!

All 8 comments

extra informaiton about the error stack:

[!] Couldn't determine repo type for URL: `https://cdn.cocoapods.org/`: uninitialized constant Pod::Source::Manager::REST
Did you mean?  Rest

/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/sources_manager.rb:74:in `rescue in cdn_url?'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/sources_manager.rb:70:in `cdn_url?'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/sources_manager.rb:34:in `create_source_with_url'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/sources_manager.rb:19:in `find_or_create_source_with_url'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:178:in `block in sources'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:177:in `map'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:177:in `sources'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:985:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:984:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer/analyzer.rb:124:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:410:in `analyze'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:234:in `block in resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/user_interface.rb:64:in `section'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:233:in `resolve_dependencies'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/installer.rb:156:in `install!'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command/install.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/claide-1.0.3/lib/claide/command.rb:334:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/lib/cocoapods/command.rb:52:in `run'
/Library/Ruby/Gems/2.6.0/gems/cocoapods-1.8.4/bin/pod:55:in `<top (required)>'
/usr/local/bin/pod:23:in `load'
/usr/local/bin/pod:23:in `<main>'

I had the same problem.

I have the same problem锛孖t seem the CDN is not work very well. Ping cdn.cocoapod.org. Most of China's City is timeout. I use the vpn in global mode, Then, Use "sudo dscacheutil -flushcache" command to refresh DNS cache. Now , It install succeed!

I have the same problem锛孖t seem the CDN is not work very well. Ping cdn.cocoapod.org. Most of China's City is timeout. I use the vpn in global mode, Then, Use "sudo dscacheutil -flushcache" command to refresh DNS cache. Now , It install succeed!

thanks for your reply.
but i think your problem is not same to this.
i can open cdn.cocoapod.org in web browser, and ping is ok.
leon@bogon ~ % ping cdn.cocoapods.org
PING cocoapods-cdn.netlify.com (206.189.89.118): 56 data bytes
64 bytes from 206.189.89.118: icmp_seq=0 ttl=48 time=422.571 ms
64 bytes from 206.189.89.118: icmp_seq=1 ttl=48 time=445.552 ms
64 bytes from 206.189.89.118: icmp_seq=2 ttl=48 time=474.188 ms
64 bytes from 206.189.89.118: icmp_seq=3 ttl=48 time=393.715 ms
^C
my problem is the "REST" variable can not work.

Yes the original problem here is not about reaching CDN its about REST missing.

@jiamuc can you gem install nap and try again?

Also please use https://bundler.io/ with a Gemfile to ensure all gems are installed and bundled.

Yes the original problem here is not about reaching CDN its about REST missing.

@jiamuc can you gem install nap and try again?

Also please use https://bundler.io/ with a Gemfile to ensure all gems are installed and bundled.

thanks for your help, after i installed "nap" , it works.
maybe the issue can be closed.
thanks again.

Yes the original problem here is not about reaching CDN its about REST missing.

@jiamuc can you gem install nap and try again?

Also please use https://bundler.io/ with a Gemfile to ensure all gems are installed and bundled.

I get the same problem if I want to install "sqflite" and "path_provider" for flutter project and run it on IOS Device or IOS Simulator. I try 'gem install nap' with bundler.io (Gemfile) but it didn鈥檛 help me. :(

UPDATE COCOAPODS

sudo gem install cocoapods

Was this page helpful?
0 / 5 - 0 ratings