Ruby 在windows中使用中间人

Ruby 在windows中使用中间人,ruby,windows,rubygems,middleman,Ruby,Windows,Rubygems,Middleman,我正在尝试在windows 8.1中安装middleman。我基本上遵循了这个帖子: 我运行了可执行文件rubynstaller-2.0.0-p481.exe。我在C:\Ruby200安装了它。然后我安装了devkit(devkit-mingw64-32-4.7.2-20130224-1151-sfx.exe)。我在C:\Ruby200\devkit提取了它。我打开一个终端,转到C:\Ruby200\devkit。运行命令ruby dk.rb init,然后运行ruby dk.rb instal

我正在尝试在windows 8.1中安装middleman。我基本上遵循了这个帖子:

我运行了可执行文件
rubynstaller-2.0.0-p481.exe
。我在
C:\Ruby200
安装了它。然后我安装了devkit(
devkit-mingw64-32-4.7.2-20130224-1151-sfx.exe
)。我在
C:\Ruby200\devkit
提取了它。我打开一个终端,转到
C:\Ruby200\devkit
。运行命令
ruby dk.rb init
,然后运行
ruby dk.rb install
。一切如期进行。然后我用命令安装了middleman 3.1.5版:
gem install middleman-v3.1.5
。它返回时没有任何错误消息。然后我转到
C:\Users\a-user\a-project
并运行
middleman init a-site
。它显示了一条错误消息:

在此计算机上可用的gems中找不到gem“wdm(~>0.1.0)x86-mingw32”。运行bundle安装以安装缺少的gems

所以我运行了
捆绑安装
。它安装了许多gems,但最后出现了一条错误消息:

DL is deprecated, please use Fiddle
Fetching gem metadata from https://rubygems.org/........
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Installing rake 10.3.2
Using i18n 0.6.11
Installing json 1.8.1
Installing minitest 5.4.0
Installing thread_safe 0.3.4
Installing tzinfo 1.2.2
Installing activesupport 4.1.4
Using bundler 1.7.0
Installing timers 1.1.0
Installing celluloid 0.15.2
Using chunky_png 1.3.1
Using coffee-script-source 1.7.1
Installing execjs 2.2.1
Installing coffee-script 2.3.0
Using multi_json 1.10.1
Installing sass 3.3.14
Installing compass-core 1.0.0.rc.1
Installing compass-import-once 1.0.4
Using rb-fsevent 0.9.4
Using ffi 1.9.3
Using rb-inotify 0.9.5
Installing compass 1.0.0.rc.0
Installing eventmachine 1.0.3
Installing http_parser.rb 0.6.0
Installing em-websocket 0.5.1
Installing erubis 2.7.0
Installing faker 1.4.2
Installing tilt 1.4.1
Using haml 4.0.5
Using hike 1.2.3
Installing uber 0.0.8
Installing hooks 0.4.0
Installing httpclient 2.4.0

Gem::Ext::BuildError: ERROR: Failed to build gem native extension.

C:/Ruby200/bin/ruby.exe -r ./siteconf20140819-4868-14ihtz1.rb extconf.rb
checking for CLOCK_MONOTONIC in time.h... yes
checking for clockid_t in time.h... yes
checking for clock_gettime() in -lrt... no
checking for t_open() in -lnsl... no
checking for socket() in -lsocket... no
checking for poll() in poll.h... no
checking for getaddrinfo() in sys/types.h,sys/socket.h,netdb.h... no getaddrinfo required
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers.  Check the mkmf.log file for more details.  You may need configuration options.

Provided configuration options:
        --with-opt-dir
        --without-opt-dir
        --with-opt-include
        --without-opt-include=${opt-dir}/include
        --with-opt-lib
        --without-opt-lib=${opt-dir}/lib
        --with-make-prog
        --without-make-prog
        --srcdir=.
        --curdir
        --ruby=C:/Ruby200/bin/ruby
        --with-rtlib
        --without-rtlib
        --with-nsllib
        --without-nsllib
        --with-socketlib
        --without-socketlib

extconf failed, exit code 1

Gem files will remain installed in C:/Ruby200/lib/ruby/gems/2.0.0/gems/kgio-2.9.2 for inspection.
Results logged to C:/Ruby200/lib/ruby/gems/2.0.0/extensions/x86-mingw32/2.0.0/kgio-2.9.2/gem_make.out
An error occurred while installing kgio (2.9.2), and Bundler cannot continue.
Make sure that `gem install kgio -v '2.9.2'` succeeds before bundling.
在gem_make.out的日志中:

C:/Ruby200/bin/ruby.exe -r ./siteconf20140819-4868-14ihtz1.rb extconf.rb 
checking for CLOCK_MONOTONIC in time.h... yes
checking for clockid_t in time.h... yes
checking for clock_gettime() in -lrt... no
checking for t_open() in -lnsl... no
checking for socket() in -lsocket... no
checking for poll() in poll.h... no
checking for getaddrinfo() in sys/types.h,sys/socket.h,netdb.h... no
getaddrinfo required
*** extconf.rb failed ***
Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers.  Check the mkmf.log file for more details.  You may need configuration options.

Provided configuration options:
    --with-opt-dir
    --without-opt-dir
    --with-opt-include
    --without-opt-include=${opt-dir}/include
    --with-opt-lib
    --without-opt-lib=${opt-dir}/lib
    --with-make-prog
    --without-make-prog
    --srcdir=.
    --curdir
    --ruby=C:/Ruby200/bin/ruby
    --with-rtlib
    --without-rtlib
    --with-nsllib
    --without-nsllib
    --with-socketlib
    --without-socketlib

extconf failed, exit code 1
我认为我不需要kgio,但我不知道如何使
捆绑安装
摆脱它


我还尝试了最新的ruby、devkit和middleman版本,但也失败了。我也试过其他版本。所有这些最终都会在一些与本机扩展相关的方面失败。

getaddrinfo required似乎暗示kgio在某种程度上不是windows友好的?也许作者需要这个?这里也是一样