-1

I'm on MacOS Ventura 13.0 and I'm trying to upgrade Rubygems.

$ gem update --system
ERROR:  While executing gem ... (Gem::RemoteFetcher::FetchError)
    Errno::ECONNREFUSED: Failed to open TCP connection to localhost:8808 (Connection refused - connect(2) for "localhost" port 8808) (http://localhost:8808/specs.4.8.gz)

How can I solve the error?

Backo
  • 18,291
  • 27
  • 103
  • 170
  • Looks like it's configured with some kind of local proxy? – tadman Mar 01 '23 at 21:42
  • Maybe I made something unwanted e.g. configuration if Rubygems has one. I also tried to install Rubygems from packages: Rubygems was upgraded but the above-mentioned error persists. Any help to make it to work would be appreciated. – Backo Mar 01 '23 at 21:51
  • Check if any sort of proxy setting is enabled, even in System Preferences or any suspicious `env` you may have. It's just using some external settings. – tadman Mar 01 '23 at 22:01
  • Also check `~/.bundle/config` -- you may have configured a caching proxy like [gemstash](https://github.com/rubygems/gemstash) that is no longer running, or otherwise misconfigured this setting. – anothermh Mar 02 '23 at 20:14
  • @anothermh, in `~/.bundle/config` I've just `--- BUNDLE_PATH: "vendor/cache"`. Where can I exactly see otherwhere? For example, in System Preferences, as said by @tadman, I don't know where to look for... and where may I've `env` statements? – Backo Mar 03 '23 at 13:11
  • OK, i solved by running in terminal the command `gem sources -r SOURCE_URI`. I'll post this as the solution. – Backo Mar 03 '23 at 13:45

1 Answers1

0

Solved: in the Terminal, cd your project folder and run the command gem sources -r SOURCE_URI where SOURCE_URI is the source to remove.

Backo
  • 18,291
  • 27
  • 103
  • 170