0

I got IPv4 address expects 4 bytes but 1 bytes error when I try to gem install

Here is my gem env:

  • RUBYGEMS VERSION: 2.3.0
  • RUBY VERSION: 1.9.3 (2014-11-13 patchlevel 551) [i386-mingw32]

Anyone know how to solved this?

Thanks!

  • `gem install` what? Ruby 1.9.3 is way out of date. Perhaps you should use 2.2.0 which is current? – the Tin Man Feb 16 '15 at 23:09
  • 1
    Can you post the output which is giving you this error? If it is from your own code, please also include the relevant code throwing the error. – JumpandSpintoWin Feb 16 '15 at 23:38
  • @theTinMan any `gem install` I guess. I tried to `gem install json` and `gem install mysql2`. I tried to use 2.1.5 but the problem persist. – William Notowidagdo Feb 17 '15 at 03:58
  • @JumpandSpintoWin the error message is `IPv4 address expects 4 bytes but 1 bytes` I will post the full output (screenshot) when I am back into Windows. No it is not from my code. I do `gem install` from Power Shell. – William Notowidagdo Feb 17 '15 at 04:00
  • Do *NOT* use a screenshot. Search engines can't index them, making the shot useless for anyone else who is searching for a solution to the same problem. Plus they generally are unreadable and include a lot of graphics we don't care about, making them useless for us. Instead, do a copy/paste of the *relevant* text, and paste it into your question (not a comment) and format it so it retains its readability. – the Tin Man Feb 17 '15 at 16:54

1 Answers1

0

The issue is related to my Internet connection. The issue resolved once I set APN protocol of my connection to IPv4/IPv6. Previously only IPv4.