52387

Cocoapods on Mac unable to install “Could not find a valid gem 'cocoapods' (>= 0)”

Question:

I have one office Mac running MacOS 10.13.2 and Ruby 2.2.1 and it is unable to install or run cocoapods via gems. sudo gem install cocoapods returns the error below. I compared the proxy and DNS configuration and it is identical to other macs that can install successfully.

▶ ping https://rubygems.org ping: cannot resolve https://rubygems.org: Unknown host

<strong>What is causing cocoapods installation to fail with the cryptic no such name (<a href="https://rubygems.org/specs.4.8.gz" rel="nofollow">https://rubygems.org/specs.4.8.gz</a>) error message?</strong>

I tried the answer from this question: <a href="https://stackoverflow.com/questions/36972339/sudo-gem-install-cocoapods-doesnt-work-on-elcapitan-10-11-4-error-could-no" rel="nofollow">'sudo gem install cocoapods' doesn't work on ElCapitan 10.11.4 , ERROR: Could not find a valid gem 'cocoapods' (>= 0) in any repository</a>

$ sudo gem install cocoapods --source http://rubygems.org <blockquote>

ERROR: Could not find a valid gem 'cocoapods' (>= 0), here is why: Unable to download data from <a href="https://rubygems.org/" rel="nofollow">https://rubygems.org/</a> - no such name (<a href="https://rubygems.org/specs.4.8.gz" rel="nofollow">https://rubygems.org/specs.4.8.gz</a>) Unable to download data from <a href="http://rubygems.org/" rel="nofollow">http://rubygems.org/</a> - no such name (<a href="http://rubygems.org/specs.4.8.gz" rel="nofollow">http://rubygems.org/specs.4.8.gz</a>)

</blockquote>

Answer1:

The problem was resolved by connecting to a mobile hotspot and updating ruby through that.

Recommend

  • JavaScript replace all but last whilst preserving original line breaks
  • Creating a Mac OSX bundle from a Java program
  • What are the potential results for platform.system()
  • How to merge two tables and transpose rows to columns
  • why isn't the natural height of a Frame updated immediately?
  • Weighted round robin dns between 2 Cloudfront distributions
  • Checking whether the server is on/off
  • DNS Lookup failed - Error with all browsers [closed]
  • How to get the index of element in the List in c#
  • Deployments not visible in Kubernetes Dashboard
  • Extracting individual digits from a float
  • Want to save selected (i.e., more than 1) enums as string with NHibernate
  • Send emails through VB6 if no email client
  • Less Conflicting Session Manager for Zope 2
  • aapt.exe'' finished with non-zero exit value 1
  • Salesforce Different WSDL files and when to use
  • Overlapping controls in Windows XP
  • AndEngine Applying Transparancy to AndEngine View
  • Jenkins: FATAL: Could not initialize class hudson.util.ProcessTree$UnixReflection
  • TextToSpeech.setEngineByPackageName() triggers NullPointerException
  • What is the purpose of TaskExecutor in spring?
  • Spring Cloud Microservice Architecture Confusion
  • Automatically associate new Sonar project with custom quality profile and quality gate
  • Jetty 9 HashLoginService
  • Installing Apache MyFaces 2 on WildFly 8.2.0
  • Moving mysql files across servers
  • Setting up SourceTree to merge unity3d scenes with UnityYAMLMerge
  • Unity3D & Android: Difference between “UnityMain” and “main” threads?
  • Read a local file using javascript
  • ImageMagick, replace semi-transparent white with opaque white
  • Cannot connect to cassandra from Spark
  • How can I send an e-mail from a vbs script
  • Apache 2.4 and php-fpm does not trigger apache http basic auth for php pages
  • Cross-Platform Protobuf Serialization
  • Alternatives to the OPTIONAL fallback SPARQL pattern?
  • Is there a mandatory requirement to switch app.yaml?
  • FormattedException instead of throw new Exception(string.Format(…)) in .NET
  • Linking SubReports Without LinkChild/LinkMaster
  • XCode 8, some methods disappeared ? ex: layoutAttributesClass() -> AnyClass
  • UserPrincipal.Current returns apppool on IIS