我从github克隆了几个月前用mac计算机制作的网站。现在我正在使用Windows,我决定运行
bundle install
但是我无法下载kgio gem版本2.9.2。
这是来自C:\ RailsInstaller \ Ruby2.0.0 \ lib \ ruby \ gems \ 2.0.0 \ gems \ kgio-2.9.2 \ ext \ kgioC:\ RailsInstaller \ Ruby2.0.0 \ lib \ ruby \的日志宝石\ 2.0.0 \宝石\ kgio-2.9.2 \分机\ kgio:
C:/RailsInstaller/Ruby2.0.0/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:/RailsInstaller/Ruby2.0.0/bin/ruby
--with-rtlib
--without-rtlib
--with-nsllib
--without-nsllib
--with-socketlib
--without-socketlib
这是我的gemfile:
source 'http://rubygems.org'
ruby '2.0.0'
#ruby-gemset=railstutorial_rails_4_0
gem 'rails', '4.0.8'
gem 'bcrypt','3.1.7'
gem 'bootstrap-sass', '3.2.0.0'
gem 'sprockets', '2.11.0'
gem 'carrierwave', '0.10.0'
gem 'mini_magick', '3.8.0'
gem 'fog', '1.23.0'
gem 'sorcery'
gem 'will_paginate', '3.0.7'
gem 'bootstrap-will_paginate', '0.0.10'
gem 'sunspot_rails'
gem 'progress_bar'
group :development, :test do
gem 'sqlite3', '1.3.8'
gem 'rspec-rails', '2.13.1'
gem 'sunspot_solr'
end
group :test do
gem 'selenium-webdriver', '2.35.1'
gem 'capybara', '2.1.0'
end
gem 'sass-rails', '4.0.3'
gem 'uglifier', '2.1.1'
gem 'coffee-rails', '4.0.1'
gem 'jquery-rails', '3.0.4'
gem 'turbolinks', '1.1.1'
gem 'jbuilder', '1.0.2'
group :doc do
gem 'sdoc', '0.3.20', require: false
end
group :production do
gem 'pg', '0.15.1'
gem 'rails_12factor', '0.0.2'
gem 'unicorn'
end
这是我的Gemfile.lock:
GEM
remote: http://rubygems.org/
specs:
actionmailer (4.0.8)
actionpack (= 4.0.8)
mail (~> 2.5.4)
actionpack (4.0.8)
activesupport (= 4.0.8)
builder (~> 3.1.0)
erubis (~> 2.7.0)
rack (~> 1.5.2)
rack-test (~> 0.6.2)
activemodel (4.0.8)
activesupport (= 4.0.8)
builder (~> 3.1.0)
activerecord (4.0.8)
activemodel (= 4.0.8)
activerecord-deprecated_finders (~> 1.0.2)
activesupport (= 4.0.8)
arel (~> 4.0.0)
activerecord-deprecated_finders (1.0.3)
activesupport (4.0.8)
i18n (~> 0.6, >= 0.6.9)
minitest (~> 4.2)
multi_json (~> 1.3)
thread_safe (~> 0.1)
tzinfo (~> 0.3.37)
arel (4.0.2)
bcrypt (3.1.7)
bootstrap-sass (3.2.0.0)
sass (~> 3.2)
bootstrap-will_paginate (0.0.10)
will_paginate
builder (3.1.4)
capybara (2.1.0)
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
rack (>= 1.0.0)
rack-test (>= 0.5.4)
xpath (~> 2.0)
carrierwave (0.10.0)
activemodel (>= 3.2.0)
activesupport (>= 3.2.0)
json (>= 1.7)
mime-types (>= 1.16)
childprocess (0.5.5)
ffi (~> 1.0, >= 1.0.11)
coffee-rails (4.0.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
coffee-script (2.3.0)
coffee-script-source
execjs
coffee-script-source (1.8.0)
diff-lcs (1.2.5)
erubis (2.7.0)
excon (0.41.0)
execjs (2.2.2)
faraday (0.9.0)
multipart-post (>= 1.2, < 3)
ffi (1.9.6)
fog (1.23.0)
fog-brightbox
fog-core (~> 1.23)
fog-json
fog-softlayer
ipaddress (~> 0.5)
nokogiri (~> 1.5, >= 1.5.11)
fog-brightbox (0.6.1)
fog-core (~> 1.22)
fog-json
inflecto
fog-core (1.24.0)
builder
excon (~> 0.38)
formatador (~> 0.2)
mime-types
net-scp (~> 1.1)
net-ssh (>= 2.1.3)
fog-json (1.0.0)
multi_json (~> 1.0)
fog-softlayer (0.3.24)
fog-core
fog-json
formatador (0.2.5)
highline (1.6.21)
hike (1.2.3)
i18n (0.6.11)
inflecto (0.0.2)
ipaddress (0.8.0)
jbuilder (1.0.2)
activesupport (>= 3.0.0)
jquery-rails (3.0.4)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.8.1)
jwt (1.0.0)
kgio (2.9.2)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.25.1)
mini_magick (3.8.0)
subexec (~> 0.2.1)
mini_portile (0.6.0)
minitest (4.7.5)
multi_json (1.10.1)
multi_xml (0.5.5)
multipart-post (2.0.0)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (2.9.1)
nokogiri (1.6.3.1)
mini_portile (= 0.6.0)
oauth (0.4.7)
oauth2 (0.9.4)
faraday (>= 0.8, < 0.10)
jwt (~> 1.0)
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (~> 1.2)
options (2.3.2)
pg (0.15.1)
polyglot (0.3.5)
pr_geohash (1.0.0)
progress_bar (1.0.3)
highline (~> 1.6.1)
options (~> 2.3.0)
rack (1.5.2)
rack-test (0.6.2)
rack (>= 1.0)
rails (4.0.8)
actionmailer (= 4.0.8)
actionpack (= 4.0.8)
activerecord (= 4.0.8)
activesupport (= 4.0.8)
bundler (>= 1.3.0, < 2.0)
railties (= 4.0.8)
sprockets-rails (~> 2.0)
rails_12factor (0.0.2)
rails_serve_static_assets
rails_stdout_logging
rails_serve_static_assets (0.0.2)
rails_stdout_logging (0.0.3)
railties (4.0.8)
actionpack (= 4.0.8)
activesupport (= 4.0.8)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
raindrops (0.13.0)
rake (10.3.2)
rdoc (3.12.2)
json (~> 1.4)
rsolr (1.0.10)
builder (>= 2.1.2)
rspec-core (2.13.1)
rspec-expectations (2.13.0)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.13.1)
rspec-rails (2.13.1)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 2.13.0)
rspec-expectations (~> 2.13.0)
rspec-mocks (~> 2.13.0)
rubyzip (0.9.9)
sass (3.2.19)
sass-rails (4.0.3)
railties (>= 4.0.0, < 5.0)
sass (~> 3.2.0)
sprockets (~> 2.8, <= 2.11.0)
sprockets-rails (~> 2.0)
sdoc (0.3.20)
json (>= 1.1.3)
rdoc (~> 3.10)
selenium-webdriver (2.35.1)
childprocess (>= 0.2.5)
multi_json (~> 1.0)
rubyzip (< 1.0.0)
websocket (~> 1.0.4)
sorcery (0.8.6)
bcrypt (~> 3.1)
oauth (~> 0.4, >= 0.4.4)
oauth2 (>= 0.8.0, < 1.0.0)
sprockets (2.11.0)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.2.0)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
sqlite3 (1.3.8)
subexec (0.2.3)
sunspot (2.1.1)
pr_geohash (~> 1.0)
rsolr (~> 1.0.7)
sunspot_rails (2.1.1)
nokogiri
rails (>= 3)
sunspot (= 2.1.1)
sunspot_solr (2.1.1)
thor (0.19.1)
thread_safe (0.3.4)
tilt (1.4.1)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
turbolinks (1.1.1)
coffee-rails
tzinfo (0.3.41)
uglifier (2.1.1)
execjs (>= 0.3.0)
multi_json (~> 1.0, >= 1.0.2)
unicorn (4.8.3)
kgio (~> 2.6)
rack
raindrops (~> 0.7)
websocket (1.0.7)
will_paginate (3.0.7)
xpath (2.0.0)
nokogiri (~> 1.3)
PLATFORMS
ruby
DEPENDENCIES
bcrypt (= 3.1.7)
bootstrap-sass (= 3.2.0.0)
bootstrap-will_paginate (= 0.0.10)
capybara (= 2.1.0)
carrierwave (= 0.10.0)
coffee-rails (= 4.0.1)
fog (= 1.23.0)
jbuilder (= 1.0.2)
jquery-rails (= 3.0.4)
mini_magick (= 3.8.0)
pg (= 0.15.1)
progress_bar
rails (= 4.0.8)
rails_12factor (= 0.0.2)
rspec-rails (= 2.13.1)
sass-rails (= 4.0.3)
sdoc (= 0.3.20)
selenium-webdriver (= 2.35.1)
sorcery
sprockets (= 2.11.0)
sqlite3 (= 1.3.8)
sunspot_rails
sunspot_solr
turbolinks (= 1.1.1)
uglifier (= 2.1.1)
unicorn
will_paginate (= 3.0.7)
答案 0 :(得分:3)
我一直面临与Linux操作系统应用程序相同的问题,我一直在Windows上顽固地开发。简而言之,unicorn
gem仅依赖kgio
* {nix},如this similar StackOverflow问题中所述。
然而!一切都没有丢失,因为为了在Windows上本地运行你的项目,你可以使用其他要求较低的宝石 - 我使用thin
一段时间,但后来意识到RubyMine很乐意用WEBrick加载Rails应用程序。如果您有一台生产Linux服务器并希望在那里使用unicorn
,但更喜欢在本地使用thin
,则可以按如下方式编辑Gemfile:
platforms :ruby do
gem 'unicorn'
end
platforms :mswin do
gem 'thin'
end
这将根据环境加载适当的宝石。
或者,您可以通过运行此命令在Windows上捆绑安装时排除包含unicorn
的组:
bundle install --without production
然后它会停止抱怨kgio,但你仍然可以使用Rails附带的WEBrick服务器运行你的应用程序(正如我所说,我只在RubyMine中完成了这个,但我相信你可以运行启动它直接来自命令行。)