我是ruby和rails的新手。我已成功在rails 4上设置ruby 2(在Windows 7上)。我在基于git项目的rails上克隆了一个ruby(thingspeak - https://github.com/iobridge/thingspeak/blob/master/README.textile)。使用命令行,我进入项目目录并运行" bundle install"。下载并安装了一些软件包然后我收到了以下错误 -
::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.
关于它意味着什么以及如何解决它的任何想法?
答案 0 :(得分:0)
此处无法编译的kgio
gem在Windows上不起作用。如果您对Gemfile
中的相应行进行评论,但可以工作,但在其他各个地方可能会失败。
通常,您要安装的Rails应用程序似乎根本不在Windows上进行测试,因此您可能希望使用更好的支持操作系统来安装它。 README在这里提到了Ubuntu。