Rails 5.2 - 当 bundle update 没有更新 Rake Gem 时如何更新它?
Rails 5.2 - How Can I Update the Rake Gem when bundle update doesn't update it?
我在同一个 RVM gem 集中有多个 Rails 5.2 应用程序。我已经在其中几个中执行了 bundle update
。他们都将 rake gem 从 12.3.3 更新到当前版本 13.0.1,除了一个没有更新 rake gem.
这是更新 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)
这是我的应用程序捆绑包更新命令中的前几条消息,但没有抽成 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
我试过了。
[currentapp (master)]$ gem update rake
Updating installed gems
Nothing to update
这个我也试过了
[currentapp (master)]$ bundle update rake
....
Bundler attempted to update rake but its version stayed the same
Bundle updated!
耙子的两个版本 gem 都在我的 gem 集合中。
我还没有找到其他解决方案。如何更新抽成 gem?
您的一个依赖项(或您的 Gemfile 本身)对未通过 13.0.1 的 rake 版本有要求。
在 Gemfile.lock 中查找哪个 gem 依赖于 rake 并阻止其更新,您也需要更新它(如果 gem 已经更新)
我在同一个 RVM gem 集中有多个 Rails 5.2 应用程序。我已经在其中几个中执行了 bundle update
。他们都将 rake gem 从 12.3.3 更新到当前版本 13.0.1,除了一个没有更新 rake gem.
这是更新 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)
这是我的应用程序捆绑包更新命令中的前几条消息,但没有抽成 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
我试过了。
[currentapp (master)]$ gem update rake
Updating installed gems
Nothing to update
这个我也试过了
[currentapp (master)]$ bundle update rake
....
Bundler attempted to update rake but its version stayed the same
Bundle updated!
耙子的两个版本 gem 都在我的 gem 集合中。
我还没有找到其他解决方案。如何更新抽成 gem?
您的一个依赖项(或您的 Gemfile 本身)对未通过 13.0.1 的 rake 版本有要求。
在 Gemfile.lock 中查找哪个 gem 依赖于 rake 并阻止其更新,您也需要更新它(如果 gem 已经更新)