'require': 无法加载此类文件 -- 运行 `rails server` 时出现 'nokogiri okogiri' (LoadError) [英] 'require': cannot load such file -- 'nokogiri okogiri' (LoadError) when running `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
其他一切都保持默认.
当我收到错误消息而不是运行服务器时,进程在最后一行失败
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': 无法加载此类文件 -- 运行 `rails server` 时出现 'nokogiri okogiri' (LoadError)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!