如何在Windows中使用新版本运行Ruby on Rails项目(以前的版本)

时间:2015-05-27 12:01:11

标签: ruby-on-rails ruby

我以前的版本ruby项目是

Ruby - 2.2.0
Rails - 4.2.0

我需要将我的项目更新为新版本

Ruby - 2.2.2
Rails - 4.2.1
(currently)

但它在装载铁轨时显示错误

Could you please suggest how to update my previous version to run in new version ?

注意:我使用的是Windows 8.1操作系统

这是我运行rails -v和ruby bin / rails s时的错误

Could not find kgio-2.9.3 in any of the sources
Run `bundle install` to install missing gems.

这是我的Gem文件,

source 'https://rubygems.org'
ruby '2.2.0'

gem 'rails', '4.2.0'
gem 'unicorn-rails'
gem 'unicorn-worker-killer'
gem 'rack-timeout'
gem 'responders', '~> 2.0'
gem 'ar-as-batches', github: 'telent/ar-as-batches', branch: 'master'

gem 'sass-rails', github: 'rails/sass-rails', branch: '4-0-stable'
gem 'coffee-rails'
gem 'compass-rails'
gem 'uglifier'

gem 'angularjs-rails-resource'
gem 'angular-rails-templates'
gem 'ngannotate-rails'
gem 'lodash-rails'

gem 'stripe-rails'

gem 'bcrypt'
gem 'active_model_serializers', github: 'rails-api/active_model_serializers',
  branch: '0-8-stable'
gem 'gon'

gem 'acts_as_tenant'
gem 'acts_as_relation', '~> 1.0'

gem 'will_paginate'
gem 'api-pagination'

gem 'activemerchant'
gem 'therubyracer'
gem 'unirest'

group :development do
  gem 'spring'
  gem 'fontcustom'
end

group :development, :test do
  gem 'sqlite3'
end

group :production do
  gem 'pg'
  gem 'rails_12factor'
  gem 'aws-sdk'
end

运行捆绑安装时

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

    C:/Ruby/Ruby22/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:/Ruby/Ruby22/bin/$(RUBY_BASE_NAME)
        --with-rtlib
        --without-rtlib
        --with-nsllib
        --without-nsllib
        --with-socketlib
        --without-socketlib


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

0 个答案:

没有答案