简体   繁体   English

extconf.rb失败(Ruby On Rails)

[英]extconf.rb failed (Ruby On Rails)

Im new to ruby and rails. 我是红宝石和铁轨的新手。 I've set up ruby 2 on rails 4 successfully (On windows 7). 我已经成功在Rails 4上设置了ruby 2(在Windows 7上)。 I cloned a ruby on rails based git project (thingspeak - https://github.com/iobridge/thingspeak/blob/master/README.textile ). 我在基于Rails的git项目上克隆了一个ruby(thingspeak- https://github.com/iobridge/thingspeak/blob/master/README.textile )。 Using the command line I went into the project directory and ran "bundle install". 使用命令行进入项目目录并运行“捆绑安装”。 A few bundles got downloaded and installed and then I got the following error - 下载并安装了一些捆绑软件,然后出现以下错误-

::Installer::ExtensionBuildError: ERROR: Failed to build gem native extension
.

    c:/row/Ruby200/bin/ruby.exe 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:/row/Ruby200/bin/ruby
        --with-rtlib
        --without-rtlib
        --with-nsllib
        --without-nsllib
        --with-socketlib
        --without-socketlib

Gem files will remain installed in c:/row/Ruby200/lib/ruby/gems/2.0.0/gems/kgio-
2.8.1 for inspection.
Results logged to c:/row/Ruby200/lib/ruby/gems/2.0.0/gems/kgio-2.8.1/ext/kgio/ge
m_make.out
An error occurred while installing kgio (2.8.1), and Bundler cannot continue.
Make sure that `gem install kgio -v '2.8.1'` succeeds before bundling.

Any ideas on what it means and how to fix it? 关于它的含义以及如何解决的任何想法?

The kgio gem which fails to compile here does not work on Windows. 无法在此处编译的kgio gem在Windows上不起作用。 It could work if you comment the respective line in the Gemfile but could fail in various other places. 如果你对此有何评论在各行它可以工作Gemfile ,但在不同的其他地方可能会失败。

Generally, the Rails app you want to install doesn't seem to be tested on Windows at all, so you might instead want to use a better supported OS to install it. 通常,您要安装的Rails应用似乎根本没有在Windows上进行过测试,因此您可能想使用支持更好的操作系统来安装它。 The README mentions Ubuntu here. 自述文件在这里提到了Ubuntu。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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