'require': 无法加载此类文件 -- 'nokogiri okogiri' (LoadError) 在运行 `rails server` 时 [英] 'require': cannot load such file -- 'nokogiri okogiri' (LoadError) when running `rails server`

查看:27
本文介绍了'require': 无法加载此类文件 -- 'nokogiri okogiri' (LoadError) 在运行 `rails server` 时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 DevKit 在 Windows 8.1 上运行 Ruby 2.2.1 的全新安装.安装后我运行:

I'm running a clean install of Ruby 2.2.1 on Windows 8.1 with DevKit. After the installation I run:

gem install rails
rails new testapp
cd testapp
rails server

将其他所有内容保留为默认值.

leaving everything else at default.

当我收到错误消息而不是运行服务器时,进程在最后一行失败

The process fails at the last line when, instead of running the server, I get the error message

in 'require': cannot load such file -- 'nokogiri
okogiri' (LoadError)

它每次都会发生,我环顾四周并尝试了我发现的所有方法来修复它,但到目前为止没有任何效果.

It happens every time and I've looked around and tried everything I found to fix it, but nothing so far has worked.

这里有什么问题,如何让一个简单的测试 Rails 应用程序工作?

What is the problem here and how do I get a simple test Rails app to work?

推荐答案

Nokogiri 还不支持 Windows 上的 Ruby 2.2.下个版本会.请参阅 https://github.com/sparklemotion/nokogiri/issues/1256

Nokogiri doesn't support Ruby 2.2 on Windows yet. The next release will. See https://github.com/sparklemotion/nokogiri/issues/1256

Nokogiri 不支持 Windows 上的原生构建(例如使用 devkit).相反,它提供了包含预构建 DLL 的 gem.

Nokogiri doesn't support native builds (e.g. with devkit) on Windows. Instead it provides gems containing prebuilt DLLs.

您可能想在此处加入或观看有关 devkit 构建支持主题的讨论:https://github.com/sparklemotion/nokogiri/issues/1190

There's a discussion which you may want to join or watch on the topic of devkit build support here: https://github.com/sparklemotion/nokogiri/issues/1190

这篇关于'require': 无法加载此类文件 -- 'nokogiri okogiri' (LoadError) 在运行 `rails server` 时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆