If you have recently experienced problems connecting to Gem repositories (Ruby package management), it’s likely due to HTTPS restrictions. To resolve this, you can switch the default repositories to HTTP. Use the following commands in your terminal:

gem source -r https://rubygems.org
gem source -a http://rubygems.org