използване на посредник в windows

Опитвам се да инсталирам посредник в Windows 8.1. До голяма степен проследих тази публикация: Как да отстранявам грешки в Middleman 3 проблеми с инсталирането на gem в Windows.

Стартирах изпълнимия файл rubyinstaller-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. Всичко работи според очакванията. След това инсталирах посредник версия 3.1.5 с командата:gem install middleman -v 3.1.5. Върна се без никакви съобщения за грешка. След това отидох на C:\Users\a-user\a-project и стартирах middleman init a-site. Той показа съобщение за грешка:

Не можах да намеря gem 'wdm (~> 0.1.0) x86-mingw32' в наличните скъпоценни камъни на тази машина. Стартирайте инсталиране на пакет, за да инсталирате липсващи скъпоценни камъни.

Така че изтичах bundle install. Той инсталира много скъпоценни камъни, но завърши със съобщение за грешка:

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, но не знам как да накарам bundle install да се отърве от това.

Опитах и ​​най-новата версия на ruby, devkit и middleman и тя също се провали. Пробвах и други версии. И всичко това в крайна сметка се проваля в нещо, свързано с родните разширения.


person Carlos Nunes    schedule 19.08.2014    source източник
comment
Изискването на getaddrinfo изглежда предполага, че kgio не е ли по някакъв начин приятелски настроен към Windows? може би авторите имат нужда от това? stackoverflow.com/questions/12765743/getaddrinfo-on-win32   -  person rogerdpack    schedule 20.08.2014
comment
същия случай тук stackoverflow.com/questions/25303719/   -  person Manojkumar    schedule 20.08.2014