codigomonstruo
codigomonstruo

Reputation: 1091

Cannot install kgio gem 2.9.2 ? Help please?

I cloned from github a website I made several months ago with a mac computer. Now I am using windows and I decided to run

bundle install

However I have not been able to download the kgio gem version 2.9.2 .

Here is the log from C:\RailsInstaller\Ruby2.0.0\lib\ruby\gems\2.0.0\gems\kgio-2.9.2\ext\kgioC:\RailsInstaller\Ruby2.0.0\lib\ruby\gems\2.0.0\gems\kgio-2.9.2\ext\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

Here is my 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

Here is my 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)

Upvotes: 2

Views: 2509

Answers (1)

Emma Burrows
Emma Burrows

Reputation: 5144

I've been facing the same issue with a Linux OS application I've been stubbornly developing on Windows. In a nutshell, the unicorn gem relies on kgio which is *nix only, as described in this similar StackOverflow question.

However! All is not lost, as in order to run your project locally on Windows, you can use other less demanding gems - I used thin for a while, but then realised that RubyMine would quite happily load up the Rails application with WEBrick. If you have a production Linux server and want to use unicorn there, but prefer using thin locally, you can edit your Gemfile as follows:

platforms :ruby do
  gem 'unicorn'
end
platforms :mswin do
  gem 'thin'
end

This will load the appropriate gems depending on the environment.

Or you can exclude the group that contains unicorn when you bundle install on Windows by running this command:

bundle install --without production

And then it'll stop complaining about kgio but you can still run your app using the WEBrick server that comes with Rails (as I said, I've only done this within RubyMine, but I'm sure you can run start it directly from the command line).

Upvotes: 3

Related Questions