【问题标题】:Ruby on rails : Bundle update giving errors in WindowsRuby on rails:捆绑更新在 Windows 中出现错误
【发布时间】:2019-09-07 12:44:36
【问题描述】:

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

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

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

* extconf.rb failed * 由于某种原因无法创建 Makefile,可能缺少必要的库和/或头文件。查看 mkmf.log 文件以获取更多详细信息。您可能需要配置 选项。

提供的配置选项: --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 --没有-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 `': "libxml2" 包不可用。 (运行时错误)

要查看此扩展无法编译的原因,请查看 mkmf.log 可以在这里找到:

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

extconf 失败,退出代码 1

Gem 文件将继续安装在 C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/ovirt-engine-sdk-4.3.0 检查。结果记录到 C:/Ruby24-x64/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/ovirt-engine-sdk-4.3.0/gem_make.out

安装 ovirt-engine-sdk (4.3.0) 时出错,并且 Bundler 无法继续。在捆绑之前确保gem install ovirt-engine-sdk -v '4.3.0' --source 'https://rubygems.org/' 成功。

在 Gemfile 中:雾被解析为 2.1.0,这取决于 fog-ovirt 被解析为 1.1.6,这取决于 ovirt-engine-sdk

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

【问题讨论】:

标签: ruby-on-rails ruby windows libxml2 ovirt


【解决方案1】:

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

【讨论】:

    猜你喜欢
    • 2015-01-30
    • 2011-07-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2014-12-24
    • 1970-01-01
    • 2020-10-27
    相关资源
    最近更新 更多