简体   繁体   中英

Installing gem error (EADDRNOTAVAIL)

I am trying to install Redmine to a Windows Server 2012, following " How to MANUALLY install Redmine 3.x on Windows Server 2008 R2 ".

After installing http://rubyinstaller.org/downloads/ the next step is to install Bundler but I got the following error:

C:\inetpub\wwwroot\redmine>ruby -v
ruby 2.2.4p230 (2015-12-16 revision 53155) [i386-mingw32]

C:\inetpub\wwwroot\redmine>gem list

*** LOCAL GEMS ***

bigdecimal (1.2.6)
io-console (0.4.3)
json (1.8.1)
minitest (5.4.3)
power_assert (0.2.2)
psych (2.0.8)
rake (10.4.2)
rdoc (4.2.0)
test-unit (3.0.8)

C:\inetpub\wwwroot\redmine>gem install bundler
ERROR:  While executing gem ... (Errno::EADDRNOTAVAIL)
    The requested address is not valid in its context. - connect(2) for "0.0.0.0
" port 53

C:\inetpub\wwwroot\redmine>

Any help would be appreciated.

Check your DNS is right. If your DNS not set, gem will display below error:

ERROR: While executing gem … (Errno::EADDRNOTAVAIL) The requested address is not valid in its context. – connect(2) for “0.0.0.0″ port 53

Found it! You need to install a loopback adapter on Windows. There's lots of guides on how to do it. One of the first links on DuckDuckGo is that .

After poking around with ruby I noticed that uninstalling and reinstalling ruby does not remove some configs. I found a command:

gem env

This gave me the location of the configuration files. After completely deleting the directory .gem it started to work! Looks like something messed up my gem config and the defaults are right.

  1. Start Command prompt with Ruby
  2. Use command: gem env
  3. Check GEM PATHS and locate directory .gem
  4. Delete .gem directory
  5. Done

Good luck!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM