Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
734 views
in Technique[技术] by (71.8m points)

ruby - 'require': cannot load such file -- 'nokogiri okogiri' (LoadError) when running `rails server`

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.

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

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

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

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

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


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...