Nokogiri 需要 Ruby 版本 <2.3 [英] Nokogiri requires Ruby version < 2.3

查看:63
本文介绍了Nokogiri 需要 Ruby 版本 <2.3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试让 Rails 在 Windows 10 上运行.我正在使用 Ruby 2.3.0 和 Rails 4.2.6,并且暂时使用 Nokogiri 1.6.3.

I am trying to get Rails to work on Windows 10. I am using Ruby 2.3.0, and Rails 4.2.6, and am temporarily using Nokogiri 1.6.3.

当我尝试运行 rails new demo 时,它返回一个错误:

When I try running rails new demo, it returns an error:

An error occurred while installing nokogiri (1.6.7.2), and Bundler cannot
continue.
Make sure that `gem install nokogiri -v '1.6.7.2'` succeeds before bundling.

当我运行 gem install nokogiri -v '1.6.7.2 我得到:

ERROR:  Error installing nokogiri:
        nokogiri requires Ruby version < 2.3, >= 1.9.2.

如何更新 Nokogiri 并使 Rails 正常工作?

How do I update Nokogiri and get Rails to work?

推荐答案

安装最新版本的 Nokogiri.在 Gemfile 中:

Install the newest version of Nokogiri. In Gemfile:

gem 'nokogiri', '~> 1.6.8.rc2'

这篇关于Nokogiri 需要 Ruby 版本 &lt;2.3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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