为什么捆绑器找不到兼容版本?
Why can't bundler find compatible version?
我正在尝试升级一些 gem,在执行 bundle update
:
时,bundler 给了我以下信息
Bundler could not find compatible versions for gem "actionmailer":
In Gemfile:
devise_invitable was resolved to 2.0.1, which depends on
actionmailer (>= 5.0)
rails (= 5.1.7) was resolved to 5.1.7, which depends on
actionmailer (= 5.1.7)
我没有发现为什么它不只是使用 5.1.7?
另一个例子:
Bundler could not find compatible versions for gem "redis":
In Gemfile:
redis (~> 3.3.1)
redis-objects (~> 1.2.1) was resolved to 1.2.1, which depends on
redis (>= 3.0.2)
sidekiq-limit_fetch was resolved to 3.4.0, which depends on
sidekiq (>= 4) was resolved to 5.2.8, which depends on
redis (>= 3.3.5, < 5)
sidekiq_newrelic_monitor was resolved to 0.1.2, which depends on
redis
split (~> 3.2.0) was resolved to 3.2.0, which depends on
redis (>= 2.1)
为什么不直接使用 3.3.x?
捆绑器版本 1.17.3
来自评论的更新:
cat Gemfile.lock | grep 'redis'
redis
redis
redis (3.3.5)
redis-objects (1.2.1)
redis (>= 3.0.2)
redis (>= 3.3.5, < 5)
redis (>= 2.1)
redis (~> 3.3.1)
redis-objects (~> 1.2.1)
你能不能把actionmailer的版本自己指定成你认为可以解决的版本,像这样:
actionmailer, 5.1.7
如果在运行宁bundle update
时遇到问题,可以删除Gemfile.lock
文件,然后运行bundle update
重新生成Gemfile.lock
, 这可能会解决问题。
所以,事实证明捆绑器 1.x 无法正确报告依赖性问题,因此我升级到 2.x 以更好地发现它。我通过从我的 gemfiles 中注释掉除 rails 之外的所有内容来做到这一点。然后 运行 bundle update
一次一个,同时评论越来越多的宝石。随着依赖性问题的出现,它解决了这些问题。
我正在尝试升级一些 gem,在执行 bundle update
:
Bundler could not find compatible versions for gem "actionmailer":
In Gemfile:
devise_invitable was resolved to 2.0.1, which depends on
actionmailer (>= 5.0)
rails (= 5.1.7) was resolved to 5.1.7, which depends on
actionmailer (= 5.1.7)
我没有发现为什么它不只是使用 5.1.7?
另一个例子:
Bundler could not find compatible versions for gem "redis":
In Gemfile:
redis (~> 3.3.1)
redis-objects (~> 1.2.1) was resolved to 1.2.1, which depends on
redis (>= 3.0.2)
sidekiq-limit_fetch was resolved to 3.4.0, which depends on
sidekiq (>= 4) was resolved to 5.2.8, which depends on
redis (>= 3.3.5, < 5)
sidekiq_newrelic_monitor was resolved to 0.1.2, which depends on
redis
split (~> 3.2.0) was resolved to 3.2.0, which depends on
redis (>= 2.1)
为什么不直接使用 3.3.x?
捆绑器版本 1.17.3
来自评论的更新:
cat Gemfile.lock | grep 'redis'
redis
redis
redis (3.3.5)
redis-objects (1.2.1)
redis (>= 3.0.2)
redis (>= 3.3.5, < 5)
redis (>= 2.1)
redis (~> 3.3.1)
redis-objects (~> 1.2.1)
你能不能把actionmailer的版本自己指定成你认为可以解决的版本,像这样:
actionmailer, 5.1.7
如果在运行宁bundle update
时遇到问题,可以删除Gemfile.lock
文件,然后运行bundle update
重新生成Gemfile.lock
, 这可能会解决问题。
所以,事实证明捆绑器 1.x 无法正确报告依赖性问题,因此我升级到 2.x 以更好地发现它。我通过从我的 gemfiles 中注释掉除 rails 之外的所有内容来做到这一点。然后 运行 bundle update
一次一个,同时评论越来越多的宝石。随着依赖性问题的出现,它解决了这些问题。