简体   繁体   中英

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. I have executed bundle update in several of them. 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.

Here are the first few messages in my bundle update command for an app that updated the rake gem.

[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.

[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.

在此处输入图片说明

I have not found other solutions to this. How can I update the rake gem?

One of your dependencies (or your Gemfile itself) has a requirement for rake version, that does not pass 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)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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