[英]Gem::InstallError: nokogiri requires Ruby version < 2.4, >= 2.1.0. rails
After running rails new demo
I get the following error: 运行rails new demo
我收到以下错误:
Gem::InstallError: nokogiri requires Ruby version < 2.4, >= 2.1.0.
An error occurred while installing nokogiri (1.7.1), and Bundler cannot
continue.
Make sure that `gem install nokogiri -v '1.7.1'` succeeds before bundling.
My Ruby version is 1.9.3. 我的Ruby版本是1.9.3。 I could update ruby but I'm worried that may create even more problems. 我可以更新ruby,但我担心这可能会造成更多问题。 Any suggestions? 有什么建议?
More Information: 更多信息:
The Nokogiri gem is not listed in my Gemfile, if I run gem list
it includes nokogiri (1.6.8.1 x86-mingw32, 1.6.6.2 x86-mingw32, 1.6.1 x86-mingw32)
Nokogiri gem没有在我的Gemfile中列出,如果我运行gem list
它包括nokogiri (1.6.8.1 x86-mingw32, 1.6.6.2 x86-mingw32, 1.6.1 x86-mingw32)
You need to downgrade the version of nokogiri
to ~> 1.6.8
你需要将nokogiri
的版本降级到~> 1.6.8
change nokogiri version in Gemfile
在Gemfile
更改nokogiri版本
gem 'nokogiri', '~> 1.6.8'
Dependency for nokogiri version 1.6.8
is ruby >= 1.9.2
https://rubygems.org/gems/nokogiri/versions/1.6.8 对nokogiri版本1.6.8
依赖是ruby >= 1.9.2
https://rubygems.org/gems/nokogiri/versions/1.6.8
But it is changed for nokogiri version 1.7.1
to ruby >= 2.1.0
https://rubygems.org/gems/nokogiri/versions/1.7.1 但是nokogiri版本1.7.1
更改为ruby >= 2.1.0
https://rubygems.org/gems/nokogiri/versions/1.7.1
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.