Why is bundler unable to reach http://rubygems.org?

35,671

Solution 1

This is not a gem or ruby issue, this is a resolver issue, as you could tell from your uknown host rubygems.org response.

If your browser is resolving, try sites like:

to validate that your problem is localized.

Solution 2

Is it working when you remove the new line ?

Maybe, you should switch the Gemfile to use http instead of https

Solution 3

Sounds like you may be behind a proxy server.

Try (unix/os x)

$ export http_proxy=http://username:[email protected]:[your_proxy_port]

You may be able to get the info out of your web browser if you aren't aware of the values on your own.

On windows, you can do this by going to Environment variables and adding a new one called http_proxy with the values above.

Share:
35,671
TangoKilo
Author by

TangoKilo

I am a driven software developer with 6 years’ of experience across the entire software development life cycle in the upstream oil and gas sector (specialising in hydrocarbon allocation).

Updated on June 05, 2020

Comments

  • TangoKilo
    TangoKilo almost 4 years

    Bundle install was working perfectly yesterday but now it's returning this output in the CL:

       ~/dev/rails/sample_app$ bundle install
       Fetching gem metadata from https://rubygems.org/.
       Error Bundler::HTTPError during request to dependency API
       Fetching full source index from https://rubygems.org/
       Could not reach https://rubygems.org/
    

    the only change I made to the gem file was to add the gem for factory girl (1.4.0) in the test group.

    I'm not working behind any proxies and I'm fully connected to the internet as well. Can't seem to find anything like this on google either. Any help would be much appreciated!