When you enter the gem install bundle
command, the following error occurs and the installation is not performed:
ERROR: Could not find a valid gem 'bundler' (>=0), here is why:
Unable to download data from http://rubygems.org/ - no soch name (http://api.rubygems.org/latest_specs.4.8.gz)
How can I solve this problem?
bundler rubygems
A DNS failure is preventing communication to rubygems.org. As soon as it is restored, it will succeed.
You can check the status by retrieving domain information from the console.
host rubygems.org
I was having trouble with the same thing myself. It's been resolved now, but if something similar happens next time, you can see the site below and see if it's missing right away.
Status-RubyGems System Status https://status.rubygems.org/
Pingdom Public Reports Overview http://uptime.rubygems.org/
It seems that rubygems.org is unstable today, so maybe that's why.
-r(Remove) the source location and -a(add) the valid location
gem sources-r http://rubygems.org/-a http://production.cf.rubygems.org/
Revert
gem sources-r http://production.cf.rubygems.org/-a http://rubygems.org/
I always try to solve this problem.
Try setting the proxy with the -p option.
https://maku77.github.io/ruby/gem/gem-with-proxy.html
© 2024 OneMinuteCode. All rights reserved.