我已经下载了一个rails开源webapp,当我开始使用时:
C:\Users\admin\Downloads\iCare\icare-develop>rails server
←[31mCould not find kgio-2.8.0 in any of the sources←[0m
←[33mRun `bundle install` to install missing gems.←[0m
我尝试使用以下方法修复此错误:
cmd:>gem install kgio -v '2.8.0'
我收到了错误:
Temporarily enhancing PATH to include DevKit...
Building native extensions. This could take a while...
ERROR: Error installing kgio:
ERROR: Failed to build gem native extension.C:/Ruby193/bin/ruby.exe extconf.rb
checking for CLOCK_MONOTONIC in time.h... no
checking for CLOCK_MONOTONIC() in time.h... no
checking for clockid_t in time.h... no
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:/Ruby193/bin/ruby
--with-rtlib
--without-rtlib
--with-nsllib
--without-nsllib
--with-socketlib
--without-socketlib
和 Gem文件将保留在C:/Ruby193/lib/ruby/gems/1.9.1/gems/kgio-2.8中。 0用于检查。 结果记录到C:/Ruby193/lib/ruby/gems/1.9.1/gems/kgio-2.8.0/ext/kgio/gem_ma ke.out
之后输入了bundle install
,但没有发生任何事情......
答案 0 :(得分:14)
kgio仅适用于* nix系统。
kgio宝石页面:
kgio 2.8.0 kgio为Ruby提供非阻塞I / O方法 提高EAGAIN和EINPROGRESS的例外情况。它打算使用 与独角兽和彩虹!机架服务器,但可能被其他服务器使用 应用程序(在类Unix平台上运行)。
答案 1 :(得分:3)
试试这个
platforms :ruby do # linux
gem 'unicorn'
end
platforms :mswin do
# gems specific to windows
end
答案 2 :(得分:0)
我认为你正在使用Windows操作系统,所以只有你需要了解这个错误才能在你的gem文件中注释或删除 gem'unicorn',因为这只是对于Linux系统