Nokogiri 1.6.8 已安装,但在 运行 "bundle install" 时为以前的 Nokogiri 提供错误
Nokogiri 1.6.8 is installed but gives error for previous Nokogiri when running "bundle install"
我们关闭了服务器,Redmine 停止工作,所以我不得不重新安装 Bundler 和 运行 bundle install
。
当 运行ning bundle install
我得到这个错误:
c:\APPS\webapps\redmine-3.2.0>bundle install
Fetching gem metadata from https://rubygems.org/.............
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies....
Using rake 12.3.2
Using concurrent-ruby 1.1.5
Using i18n 0.9.5
Using json 1.8.6
Using minitest 5.11.3
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Using activesupport 4.2.5
Using builder 3.2.3
Using erubis 2.7.0
Using mini_portile2 2.4.0
Fetching nokogiri 1.9.1 (x64-mingw32)
Installing nokogiri 1.9.1 (x64-mingw32)
Gem::RuntimeRequirementNotMetError: nokogiri requires Ruby version >= 2.2, <
2.6. The current ruby version is 2.0.0.
An error occurred while installing nokogiri (1.9.1), and Bundler cannot
continue.
Make sure that `gem install nokogiri -v '1.9.1' --source
'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
rails was resolved to 4.2.5, which depends on
actionmailer was resolved to 4.2.5, which depends on
actionpack was resolved to 4.2.5, which depends on
actionview was resolved to 4.2.5, which depends on
rails-dom-testing was resolved to 1.0.9, which depends on
nokogiri
我已经安装了Nokogiri 1.6.8。我不确定为什么它无法读取我安装的 Nokogiri 版本并且仍然获取 1.9.1,因为我需要 Ruby v.2 for Redmine 2.3.0,但是我的包仍然告诉我它正在寻找1.9.1.在做 bundle install
时,我尝试根据我的研究将 Gemfile 更改为 gem "nokogiri", ">= 1.4.2"
但是 1.9.1 仍然存在。如何才能成功升级Nokogiri?
我用过:
gem "nokogiri", "1.6.8"
在我的 Gemfile 中有:
c:\APPS\webapps\redmine-3.2.0>bundle update nokogiri
Fetching gem metadata from https://rubygems.org/.............
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies....
Bundler could not find compatible versions for gem "nokogiri":
In Gemfile:
nokogiri (= 1.6.8) java
roadie-rails java was resolved to 1.2.0, which depends on
roadie (~> 3.1) java was resolved to 3.5.0, which depends on
nokogiri (~> 1.8) java
如果我 运行 什么 gem install nokogiri -v '1.9.1'
,我得到一个错误,我的 Ruby 版本低于预期,我不能有更高的 Ruby 版本,因为 Redmine 是旧版本。
以下是我拥有的所有 Nokogiri 版本:
c:\APPS\webapps\redmine-3.2.0>gem uninstall nokogiri
YAML safe loading is not available. Please upgrade psych to a version that supports safe loading (>= 2.0).
Select gem to uninstall:
1. nokogiri-1.6.8.rc3-x64-mingw32
2. nokogiri-1.6.8-x64-mingw32
3. nokogiri-1.6.8.1-x64-mingw32
4. All versions
我无法解决这个问题。它在升级和降级之间循环,所以在经历了很多挫折之后,我尝试了 Redmine 4.2 声称兼容的 Ruby 2.6,但仍然存在问题。我降级到 Ruby 2.3 并且它工作正常,然后我根据 redmine.org 文档迁移了我的数据库,几乎所有功能都正常运行,我得到的反馈是它更快。
根据我的经验,你的 Redmine 数据库仍然可以工作,所以不用担心它是同一个版本。
我们关闭了服务器,Redmine 停止工作,所以我不得不重新安装 Bundler 和 运行 bundle install
。
当 运行ning bundle install
我得到这个错误:
c:\APPS\webapps\redmine-3.2.0>bundle install
Fetching gem metadata from https://rubygems.org/.............
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies....
Using rake 12.3.2
Using concurrent-ruby 1.1.5
Using i18n 0.9.5
Using json 1.8.6
Using minitest 5.11.3
Using thread_safe 0.3.6
Using tzinfo 1.2.5
Using activesupport 4.2.5
Using builder 3.2.3
Using erubis 2.7.0
Using mini_portile2 2.4.0
Fetching nokogiri 1.9.1 (x64-mingw32)
Installing nokogiri 1.9.1 (x64-mingw32)
Gem::RuntimeRequirementNotMetError: nokogiri requires Ruby version >= 2.2, <
2.6. The current ruby version is 2.0.0.
An error occurred while installing nokogiri (1.9.1), and Bundler cannot
continue.
Make sure that `gem install nokogiri -v '1.9.1' --source
'https://rubygems.org/'` succeeds before bundling.
In Gemfile:
rails was resolved to 4.2.5, which depends on
actionmailer was resolved to 4.2.5, which depends on
actionpack was resolved to 4.2.5, which depends on
actionview was resolved to 4.2.5, which depends on
rails-dom-testing was resolved to 1.0.9, which depends on
nokogiri
我已经安装了Nokogiri 1.6.8。我不确定为什么它无法读取我安装的 Nokogiri 版本并且仍然获取 1.9.1,因为我需要 Ruby v.2 for Redmine 2.3.0,但是我的包仍然告诉我它正在寻找1.9.1.在做 bundle install
时,我尝试根据我的研究将 Gemfile 更改为 gem "nokogiri", ">= 1.4.2"
但是 1.9.1 仍然存在。如何才能成功升级Nokogiri?
我用过:
gem "nokogiri", "1.6.8"
在我的 Gemfile 中有:
c:\APPS\webapps\redmine-3.2.0>bundle update nokogiri
Fetching gem metadata from https://rubygems.org/.............
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies....
Bundler could not find compatible versions for gem "nokogiri":
In Gemfile:
nokogiri (= 1.6.8) java
roadie-rails java was resolved to 1.2.0, which depends on
roadie (~> 3.1) java was resolved to 3.5.0, which depends on
nokogiri (~> 1.8) java
如果我 运行 什么 gem install nokogiri -v '1.9.1'
,我得到一个错误,我的 Ruby 版本低于预期,我不能有更高的 Ruby 版本,因为 Redmine 是旧版本。
以下是我拥有的所有 Nokogiri 版本:
c:\APPS\webapps\redmine-3.2.0>gem uninstall nokogiri
YAML safe loading is not available. Please upgrade psych to a version that supports safe loading (>= 2.0).
Select gem to uninstall:
1. nokogiri-1.6.8.rc3-x64-mingw32
2. nokogiri-1.6.8-x64-mingw32
3. nokogiri-1.6.8.1-x64-mingw32
4. All versions
我无法解决这个问题。它在升级和降级之间循环,所以在经历了很多挫折之后,我尝试了 Redmine 4.2 声称兼容的 Ruby 2.6,但仍然存在问题。我降级到 Ruby 2.3 并且它工作正常,然后我根据 redmine.org 文档迁移了我的数据库,几乎所有功能都正常运行,我得到的反馈是它更快。
根据我的经验,你的 Redmine 数据库仍然可以工作,所以不用担心它是同一个版本。