【问题标题】:Bundler could not find compatible versions for gem "globalize":Bundler 找不到 gem "globalize" 的兼容版本:
【发布时间】:2020-10-09 20:59:19
【问题描述】:

大家好,我最近开始使用这个框架进行开发,我在本地启动项目时遇到了困难。 当我去跑步时

捆绑安装

我收到此错误消息:

Bundler could not find compatible versions for gem "globalize":   In Gemfile:
    globalize java

    globalize-accessors java was resolved to 0.2.1, which depends on
      globalize (>= 5.0.0, ~> 5.0)

Could not find gem 'globalize (>= 5.0.0, ~> 5.0)', which is required by gem 'globalize-accessors', in any of the relevant sources:   https://github.com/globalize/globalize.git (at master@bcfa30f)

Bundler could not find compatible versions for gem "globalize-accessors":   In snapshot (Gemfile.lock):
    globalize-accessors (= 0.2.1)

  In Gemfile:
    globalize-accessors java

Running `bundle update` will rebuild your snapshot from scratch, using only the gems in your Gemfile, which may resolve the conflict.

这是相关 gemfile 的一部分:

########## Globalization
gem "route_translator", git: "https://github.com/enriclluelles/route_translator.git"

gem 'activemodel-serializers-xml'
gem 'globalize-accessors'
gem 'globalize', github: 'globalize/globalize'
gem 'kaminari', github: "amatsuda/kaminari", branch: '0-17-stable'
gem "kaminari-i18n"

我也尝试运行捆绑更新,但没有解决问题

Ruby 版本:2.3.3 宝石-v:2.5.2

【问题讨论】:

    标签: ruby ruby-on-rails-5


    【解决方案1】:

    您的 gemfile 中 globalize 的版本似乎与 globalize-accessors 所需的版本不对应。

    尝试像这样安装 globalize: gem 'globalize', "~> 5.0"

    【讨论】:

      猜你喜欢
      • 2011-10-31
      • 2017-07-17
      • 2018-02-09
      • 2014-05-26
      • 2014-03-14
      • 2013-03-13
      • 2019-05-07
      • 2016-02-17
      • 2013-03-12
      相关资源
      最近更新 更多