gpt4 book ai didi

ruby-on-rails - rails 5 : Bundler could not find compatible versions for gem “actionpack” :

转载 作者:行者123 更新时间:2023-12-03 14:40:50 24 4
gpt4 key购买 nike

任何人都可以帮我将 rails 4.2 升级到 rails 5.1.4
运行包更新后得到兼容版本错误

Bundler 找不到 gem "actionpack"的兼容版本:
在 Gemfile 中:
active_link_to (~> 1.0.0) 被解析为 1.0.5,这取决于
Action 包

active_model_serializers (~> 0.10.6) was resolved to 0.10.7, which depends on
actionpack (< 6, >= 4.1)

hamlit-rails (~> 0.2.0) was resolved to 0.2.0, which depends on
actionpack (>= 4.0.1)

meta-tags (~> 2.4.1) was resolved to 2.4.1, which depends on
actionpack (< 5.2, >= 3.2.0)

rails (~> 5.1.4) was resolved to 5.1.4, which depends on
actionpack (= 5.1.4)

ransack (~> 1.6.6) was resolved to 1.6.6, which depends on
actionpack (>= 3.0)

rspec-rails (~> 3.4.2) was resolved to 3.4.2, which depends on
actionpack (< 4.3, >= 3.0)

simple_form (~> 3.5.1) was resolved to 3.5.1, which depends on
actionpack (< 5.2, > 4)

stream_rails (>= 2.5.2, ~> 2.5) was resolved to 2.6.1, which depends on
actionpack (>= 3.0.0)

twitter-typeahead-rails (~> 0.10.5) was resolved to 0.10.5, which depends on
actionpack (>= 3.1)

最佳答案

您的 rspec-rails 阻止了升级。该打包器输出显示了这一部分:

actionpack (< 4.3, >= 3.0)

因此 rspec-rails 会阻止任何大于 4.2 的内容。

释放 rspec-rails 约束 ~> 3.4.2更轻松的东西,比如 ~> 3.5然后再试一次
bundle update rails rspec-rails

一般升级Rails时,试试 bundle update rails连同所有对 Rails 有特定版本要求或从 bundler 中提到的 Gems。

关于ruby-on-rails - rails 5 : Bundler could not find compatible versions for gem “actionpack” :,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/50098395/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com