I have a Gandi Debian 9 server that I use for web page hosting.
I am trying to install a Ruby gem on the system but it looks like I am either being blocked from installing gems or I need to setup my system to install gems.
This is what I've done to debug the system
- Ran a ping to www.google.com (SUCCESSFUL)
- Ping api.rubygems.org (Network is unreachable)
- gem install selected-package (Network is unreachable - connect(2) for "api.rubygems.org" port 443)
- wget https://rubygems.org/downloads/selected-package.gem (Connecting to rubygems.org (rubygems.org)|188.8.131.52|:443... failed: Network is unreachable.)
- I a workaround listed here https://gist.github.com/luislavena/f064211759ee0f806c88 , but I couldn't use it because the gem I would like to use has a lot of dependencies.
- I looked through this issue https://gist.github.com/luislavena/f064211759ee0f806c88 (but it doesn't seem to apply to me)
- I looked through my hosts file to see if any of the entries in this link http://help.rubygems.org/discussions/problems/504-cannot-connect-to-rubygems were there. There were no offending entries in my hosts file.
gem install Error Message
Could not find a valid gem 'selected-package' (>= 0), here is why: Unable to download data from https://rubygems.org/ - Errno::ENETUNREACH: Failed to open TCP connection to api.rubygems.org:443 (Network is unreachable - connect(2) for "api.rubygems.org" port 443) (https://api.rubygems.org/specs.4.8.gz)
Results of a netstat -nr Command
Kernel IP routing table Destination Gateway Genmask Flags MSS Window irtt Iface
The Actual Problem After some debugging, the issue seems to be related to secure connections on the 443 port on my VPS. All 443 connections generating from the machine fail. Searching for methods to resolve this issue.
1. How do I enable Ruby gem installation on my Gandi server (e.g. changing hosts configuration)?