我试图通过在我的rails 5.0.2上添加gem 'rails', '~> 5.1'之后运行bundle update rails,将当前的gem 'rails', '~> 5.1'版本升级到最新的gem 'rails', '~> 5.1'版本,并收到了这条错误消息。
Bundler could not find compatible versions for gem "activesupport":
In Gemfile:
rails (~> 5.1) was resolved to 5.1.0, which depends on
activejob (= 5.1.0) was resolved to 5.1.0, which depends on
globalid (>= 0.3.6) was resolved to 0.4.0, which depends on
activesupport (>= 4.2.0)
jbuilder (~> 2.5) was resolved to 2.6.1, which depends on
activesupport (< 5.1, >= 3.0.0)
rails (~> 5.1) was resolved to 5.1.0, which depends on
activesupport (= 5.1.0)
rails (~> 5.1) was resolved to 5.1.0, which depends on
activesupport (= 5.1.0)
rails (~> 5.1) was resolved to 5.1.0, which depends on
activesupport (= 5.1.0)
rails (~> 5.1) was resolved to 5.1.0, which depends on
activesupport (= 5.1.0)
rails (~> 5.1) was resolved to 5.1.0, which depends on
activesupport (= 5.1.0)
rails (~> 5.1) was resolved to 5.1.0, which depends on
activesupport (= 5.1.0)
rails (~> 5.1) was resolved to 5.1.0, which depends on
activesupport (= 5.1.0)
rails (~> 5.1) was resolved to 5.1.0, which depends on
actionpack (= 5.1.0) was resolved to 5.1.0, which depends on
rails-dom-testing (~> 2.0) was resolved to 2.0.2, which depends on
activesupport (< 6.0, >= 4.2.0)
rails (~> 5.1) was resolved to 5.1.0, which depends on
sprockets-rails (>= 2.0.0) was resolved to 3.2.0, which depends on
activesupport (>= 4.0)发布于 2017-04-29 09:29:50
这听起来像是您需要尝试并升级到新版本的jbuilder。然而,看看RubyGems,Jbuilder当前的依赖仍然是这样的:
活动支持< 5.1,>= 3.0.0
如果是这样的话,JBuilder还不支持Rails 5.1所需要的最新的Activesupport --所以Rails 5.1中可能还没有JBuilder。
如果您需要获得更新的Rails,那么您可能应该考虑:
您可以尝试一种覆盖--因为它可能只是起作用,而且<5.1只是因为它还没有用最近的版本进行测试--如果存在真正的兼容性问题,就应该做好准备。在尝试之后,我肯定会重新运行整个测试套件。
另一种方法是稍候--这是一个非常新鲜的版本--给其他软件包一个赶上它的机会。
发布于 2017-05-05 15:03:41
删除Gemfile.lock,然后运行bundle对我有用
https://stackoverflow.com/questions/43693881
复制相似问题