简体   繁体   English

如何在项目中更新Rails的版本? Bundler找不到宝石“ activemodel”的兼容版本

[英]How do I update the version of Rails in my project? Bundler could not find compatible versions for gem “activemodel”

I don't understand the problem. 我不明白这个问题。 Bundler says it needs activemodel >= 4.2.0, >= 4.0, and = 5.2.1.rc1. Bundler表示需要activemodel > = 4.2.0,> = 4.0和= 5.2.1.rc1。 So why doesn't it just pick 5.2.1.rc1 because that satisfies all the dependencies? 那么为什么不选择5.2.1.rc1因为它满足所有依赖关系呢?

There are dozens of errors like that for the gems rails , railties , etc. 有很多错误,例如宝石railsrailties等。

I'm upgrading from Rails 4.2 to latest Rails. 我正在从Rails 4.2升级到最新的Rails。 I commented out all version specifiers except Ruby and Rails. 我注释掉了除Ruby和Rails之外的所有版本说明符。 Here is my entire Gemfile . 这是我的整个Gemfile

workspace\>bundle
Fetching gem metadata from https://rubygems.org/..............
Fetching gem metadata from https://rubygems.org/..
You have requested:
  rails ~> 5.2

The bundle currently has rails locked at 4.2.3.
Try running `bundle update rails`

If you are updating multiple gems in your Gemfile at once,
try passing them all to `bundle update`

C:\Users\Chloe\workspace\>bundle update rails
Fetching gem metadata from https://rubygems.org/..............
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies........
Bundler could not find compatible versions for gem "activemodel":
  In Gemfile:
    paperclip (~> 5.0) x64-mingw32 was resolved to 5.0.0, which depends on
      activemodel (>= 4.2.0) x64-mingw32

    rails (~> 5.2) x64-mingw32 was resolved to 5.2.1.rc1, which depends on
      activemodel (= 5.2.1.rc1) x64-mingw32

    web-console (~> 2.0) x64-mingw32 was resolved to 2.3.0, which depends on
      activemodel (>= 4.0) x64-mingw32

首先备份您的Gemfile.lock ,然后将其删除并尝试再次进行bundle install

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

相关问题 Bundler 找不到 gem "activemodel" 的兼容版本: - Bundler could not find compatible versions for gem "activemodel": Bundler找不到gem“activemodel”的兼容版本 - Bundler could not find compatible versions for gem “activemodel” Bundler找不到宝石“ activemodel”的兼容版本 - Bundler could not find compatible versions for gem “activemodel” 在捆绑包更新导轨上找不到宝石“ activemodel”的兼容版本 - Could not find compatible versions for gem “activemodel” on bundle update rails Bundler找不到宝石“ rails”的兼容版本,但已安装版本 - Bundler could not find compatible versions for gem “rails”, but version is installed Bundler 找不到 gem “activesupport” 的兼容版本:当我尝试更新 cocoapods 版本时 - Bundler could not find compatible versions for gem “activesupport”: When i try to update cocoapods version Ruby 导轨错误:捆绑器找不到 gem“捆绑器”的兼容版本: - Ruby rails error: Bundler could not find compatible versions for gem "bundler": Bundler找不到宝石“ bundler”的兼容版本 - Bundler could not find compatible versions for gem “bundler” Bundler 找不到 gem“bundler”的兼容版本: - Bundler could not find compatible versions for gem "bundler": ActiveAdmin with Rails 4:Bundler找不到宝石“ rails”的兼容版本 - ActiveAdmin with Rails 4: Bundler could not find compatible versions for gem “rails”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM