Ruby 在 rails 上:捆绑包更新在 Windows 中出现错误

Ruby on rails : Bundle update giving errors in Windows

我正在尝试 运行 我的 rails 服务器。当我第一次运行时,我得到了这样的错误

找不到时区数据源。要解决此问题,请安装 TZInfo:

我通过更新 gem 文件中 tzinfo-data 的 x64 版本解决了错误。之后,当我 运行 捆绑包更新 时,出现以下错误

* 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:/Ruby24-x64/bin/$(RUBY_BASE_NAME) --with-libxml2-config --without-libxml2-config --with-pkg-config --without-pkg-config extconf.rb:29:in `': The "libxml2" package isn't available. (RuntimeError)

To see why this extension failed to compile, please check the mkmf.log which can be found here:

C:/Ruby24-x64/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/ovirt-engine-sdk-4.3.0/mkmf.log

extconf failed, exit code 1

Gem files will remain installed in C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/ovirt-engine-sdk-4.3.0 for inspection. Results logged to C:/Ruby24-x64/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/ovirt-engine-sdk-4.3.0/gem_make.out

An error occurred while installing ovirt-engine-sdk (4.3.0), and Bundler cannot continue. Make sure that gem install ovirt-engine-sdk -v '4.3.0' --source 'https://rubygems.org/' succeeds before bundling.

In Gemfile: fog was resolved to 2.1.0, which depends on fog-ovirt was resolved to 1.1.6, which depends on ovirt-engine-sdk

可能出了什么问题?如何在 Windows 台机器上解决这个问题?

我知道这对你来说可能不是一个好的答案,但是 运行 Ruby on Rails on windows 是一种痛苦,而且会是糟糕的经历,尝试使用 Ubuntu、Debian 或任何其他 linux 发行版与 windows 一起设置双启动,然后您可以使用 RoR 进行开发。