I'm developing Ruby on Rails on Windows.
Something went wrong with our local network and can't access https://www.rubygems.org, seems like it is blocked or something.
But I can access it through http://www.proxyfoxy.com.
Below is the result of bundle install
:
$ bundle install
Fetching source index from https://rubygems.org/
Retrying fetcher due to error (2/4): Bundler::HTTPError Could not fetch specs from https://rubygems.org/
Retrying fetcher due to error (3/4): Bundler::HTTPError Could not fetch specs from https://rubygems.org/
Retrying fetcher due to error (4/4): Bundler::HTTPError Could not fetch specs from https://rubygems.org/
Could not fetch specs from https://rubygems.org/
Is there any other way to install gems through bundle install
?
In your Gemfile from the first line the source should be http:// instead of https://
change
sourçe https://www.rubygems.org
intosource http://www.rubygems.org
Then you can run
bundle install
successfullyI had the same issue and it happened to work when I shutdown the rails server before running
bundle install
I was getting the same error when running
bundle
in a rails app. I solve the problem by running:Problem was that
bundle
was v1.17.3, whilebin/bundle
was version 2.0.2.Sometimes, Your DNS cause this problem.
You can change your DNS to
1.1.1.1
or8.8.8.8
Instructions for mac
1.1.1.1
OR8.8.8.8
But you can follow these steps: http://www.macinstruct.com/node/434
Instructions for windows
https://www.windowscentral.com/how-change-your-pcs-dns-settings-windows-10