我刚刚将我的 Rails 应用程序从 v5.2.3 升级到 v6.0.0.beta3。我正在使用 Daterangepicker v3.0.3 gem,它似乎与 Rails 6.x 不兼容。我的应用程序依赖于 gem,如果可能的话,我真的很想坚持使用它(如何?),如果没有,那么什么 gem 可以替代它?
我将 Rails gem 版本更改为 edge 并运行bundle update。它输出以下内容:
Bundler could not find compatible versions for gem "actionpack":
In Gemfile:
jquery-datatables-rails (~> 3.4) was resolved to 3.4.0, which depends on
actionpack (>= 3.1)
rails (~> 6.0.0.beta3) was resolved to 6.0.0.beta3, which depends on
actionpack (= 6.0.0.beta3)
Bundler could not find compatible versions for gem "activemodel":
In Gemfile:
rails (~> 6.0.0.beta3) was resolved to 6.0.0.beta3, which depends on
activemodel (= 6.0.0.beta3)
web-console (>= 3.3.0) was resolved to 3.7.0, which depends on
activemodel (>= 5.0)
Bundler could not find compatible versions for gem "activerecord":
In Gemfile:
friendly_id (~> 5.2.4) was resolved to 5.2.5, which depends on
activerecord (>= 4.0.0)
pg_search (~> 2.1, >= 2.1.5) was resolved to 2.1.5, which depends on
activerecord (>= 4.2)
rails (~> 6.0.0.beta3) was resolved to 6.0.0.beta3, which depends on
activerecord (= 6.0.0.beta3)
Bundler could not find compatible versions for gem "activesupport":
In Gemfile:
jbuilder (~> 2.5) was resolved to 2.8.0, which depends on
activesupport (>= 4.2.0)
pundit was resolved to 2.0.1, which depends on
activesupport (>= 3.0.0)
rails (~> 6.0.0.beta3) was resolved to 6.0.0.beta3, which depends on
activesupport (= 6.0.0.beta3)
Bundler could not find compatible versions for gem "countries":
In Gemfile:
countries
country_select (~> 3.1) was resolved to 3.1.1, which depends on
countries (~> 2.0)
Bundler could not find compatible versions for gem "railties":
In Gemfile:
bootstrap-daterangepicker-rails (~> 3.0, >= 3.0.3) was resolved to 3.0.3, which depends on
railties (>= 4.0, < 5.3)
coffee-rails (~> 4.2) was resolved to 4.2.2, which depends on
railties (>= 4.0.0)
devise (~> 4.5) was resolved to 4.6.2, which depends on
railties (>= 4.1.0, < 6.0)
jquery-rails (~> 4.3, >= 4.3.3) was resolved to 4.3.3, which depends on
railties (>= 4.2.0)
momentjs-rails (~> 2.17, >= 2.17.1) was resolved to 2.20.1, which depends on
railties (>= 3.1)
rails (~> 6.0.0.beta3) was resolved to 6.0.0.beta3, which depends on
railties (= 6.0.0.beta3)
sass-rails (~> 5.0) was resolved to 5.0.7, which depends on
railties (>= 4.0.0, < 6)
web-console (>= 3.3.0) was resolved to 3.7.0, which depends on
railties (>= 5.0)
我注释掉了我的 Daterangepicker gem,并且包更新完美无缺。我看到宝石取决于railties < 5.3, >= 4.0。Rails v6 使用 railties > v4,这可能是它抛出错误的原因。我能做些什么呢?
先感谢您。