简体   繁体   English

Rails 5.2 - 当包更新没有更新 Rake Gem 时,我如何更新它?

[英]Rails 5.2 - How Can I Update the Rake Gem when bundle update doesn't update it?

I have several Rails 5.2 apps in the same RVM gemset.我在同一个 RVM gemset 中有几个 Rails 5.2 应用程序。 I have executed bundle update in several of them.我已经在其中几个中执行了bundle update All of them updated the rake gem from 12.3.3 to the current version 13.0.1 except for one that did not update the rake gem.他们都将 rake gem 从 12.3.3 更新到当前版本 13.0.1,除了一个没有更新 rake gem。

Here are the first few messages in my bundle update command for an app that updated the rake gem.以下是更新 rake gem 的应用程序的 bundle update 命令中的前几条消息。

[oldapp (master)]$ cd ~/sites/oldapp && rvm use 2.6.3@currentgemset --default
Using /Users/server1/.rvm/gems/ruby-2.6.3 with gemset currentgemset
[oldapp (master)]$ bundle update
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies.......
Using rake 13.0.1 (was 12.3.3)
Using concurrent-ruby 1.1.6 (was 1.1.5)
Using i18n 1.8.2 (was 1.6.0)

Here are the first few messages in my bundle update command for the app that didn't the rake gem.以下是我的 bundle update 命令中没有使用 rake gem 的应用程序的前几条消息。

[oldapp (master)]$ cd ~/sites/currentapp && rvm use 2.6.3@currentgemset --default
Using /Users/server1/.rvm/gems/ruby-2.6.3 with gemset currentgemset
[currentapp (master)]$ bundle update
The dependency tzinfo-data (>= 0) will be unused by any of the platforms Bundler is installing for. Bundler is installing for ruby but the dependency is only for x86-mingw32, x86-mswin32, x64-mingw32, java. To add those platforms to the bundle, run `bundle lock --add-platform x86-mingw32 x86-mswin32 x64-mingw32 java`.
Fetching gem metadata from https://rubygems.org/..........
Fetching gem metadata from https://rubygems.org/.
Resolving dependencies.........
Using rake 12.3.3
Using concurrent-ruby 1.1.6 (was 1.1.5)
Using i18n 1.8.2

I tried this.我试过这个。

[currentapp (master)]$ gem update rake
Updating installed gems
Nothing to update

I also tried this.我也试过这个。

[currentapp (master)]$ bundle update rake
....
Bundler attempted to update rake but its version stayed the same
Bundle updated!

Both versions of the rake gem are in my gemset.两个版本的 rake gem 都在我的 gemset 中。

在此处输入图片说明

I have not found other solutions to this.我还没有找到其他解决方案。 How can I update the rake gem?我怎样才能更新 rake gem?

One of your dependencies (or your Gemfile itself) has a requirement for rake version, that does not pass 13.0.1.您的依赖项之一(或您的 Gemfile 本身)对 rake 版本有要求,该版本不超过 13.0.1。

Look in Gemfile.lock to find which gem depends on rake and prevents its update, you need to update that too (if gem has already updated)查看 Gemfile.lock 以查找哪个 gem 依赖于 rake 并阻止其更新,您也需要更新它(如果 gem 已经更新)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM