Gem::RemoteFetcher::FetchError with

I got an error with:

ruby 2.5.1p57 (2018-03-29 revision 63029) [x86_64-linux]

When I tried to install the bundler:

gem install bundler

The error:

ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
    bad response Forbidden 403 (

I solved momentarily with this command:

 gem sources --remove ""

Because it is 403 Forbidden problem. Idea from: Getting a While executing gem ... (Gem::RemoteFetcher::FetchError) 503 error when attempting to install rails

Any ideas how to solve or why this error occurs.


  • Change your gem sources and try again:

    gem sources --remove
    gem sources -a