【问题标题】:RefineryCMS bundle 'conflict'RefineryCMS 捆绑“冲突”
【发布时间】:2023-03-15 14:00:01
【问题描述】:

我在 Ubuntu 系统上设置了 RefineryCMS/Ruby 当进入项目文件夹并运行 rails 服务器时,有人告诉我这个

 from /home/andrea/.rbenv/versions/2.5.3/lib/ruby/site_ruby/2.5.0/rubygems.rb:252:in `bin_path' 
/home/andrea/.rbenv/versions/2.5.3/lib/ruby/site_ruby/2.5.0/rubygems.rb:275:in `find_spec_for_exe': Could not find 'bundler' (1.17.3) required by your /home/andrea/Desktop/rubypages/foo1/Gemfile.lock. (Gem::GemNotFoundException 
To update to the latest version installed on your system, run `bundle update --bundler`.
To install the missing version, run `gem install bundler:1.17.3`

当我运行 gemlist 时,捆绑器 1.17.3 已安装并显示在列表中 捆绑器(2.1.4、1.17.3)

在运行捆绑更新时,我得到以下信息

Fetching gem metadata from https://rubygems.org/.
Resolving dependencies...
Bundler could not find compatible versions for gem "bundler":
  In Gemfile:
    rails was resolved to 6.0.2.1, which depends on
      bundler (>= 1.3.0)

    refinerycms (~> 2.1.0) was resolved to 2.1.4, which depends on
      bundler (< 2.0, >= 1.2.2)
  Current Bundler version:
    bundler (2.1.4)
This Gemfile requires a different version of Bundler.
Perhaps you need to update Bundler by running `gem install bundler`?
Could not find gem 'bundler (< 2.0, >= 1.2.2)', which is required by gem 'refinerycms (~> 2.1.0)', in any of the sources.

gem install bundler -v 1.17.3 命令运行成功 然而,当前的捆绑器是 2.1.4 我如何“摆脱”这个 2.1.4 或说服炼油厂使用 2.1.4?

【问题讨论】:

    标签: ruby-on-rails ruby bundler refinerycms


    【解决方案1】:

    选项 1:

    卸载捆绑程序 v2.1.4

    选项 2:

    您可以像这样指定使用旧版本的捆绑器:

    bundle _1.17.3_ install
    

    (如果不指定这样的版本,您的系统将使用 最新安装的版本 - 即 2.1.4 - 因此您看到的错误。)

    选项 3:

    refinerycms的版本更新为v3.0.0(2015年9月19日发布)或更高版本(最新版本为v4.0.3)。

    快速浏览 gem 的历史可以发现 version 2.x.x 依赖于捆绑器 &lt; 2.0(这可能是完全不必要的依赖!);而version 3.0.0 删除了这个约束。

    【讨论】:

      【解决方案2】:

      您绝对应该使用 RefineryCMS 的更新版本。对于 Rails 6,您必须使用 Github 的 master 分支,如下所示:

      gem 'refinerycms', git: 'https://github.com/refinery/refinerycms'
      

      还没有发布版本支持 Rails 6。

      一些扩展,特别是 refinerycms-blog 扩展还没有为 Rails 6 做好准备,甚至主存储库也缺乏支持。您可能想选择 Rails 5.2.x,它仍然受到 Rails 团队的支持。那么您应该可以使用已发布的 RefineryCMS 4.0.x 版本。

      希望这会有所帮助!

      【讨论】:

        【解决方案3】:

        谢谢你们。我降级到 Rails 5.2.0,现在卡在 actionmailer 上

        Bundler could not find compatible versions for gem "actionmailer":
          In Gemfile:
            rails (~> 5.2.0) was resolved to 5.2.1.rc1, which depends on
              actionmailer (= 5.2.1.rc1)
        
            refinerycms-authentication-devise (~> 2.0) was resolved to 2.0.0, which depends on
              actionmailer (>= 5.0.0, < 5.2)
        

        【讨论】:

        • 错误信息告诉你问题出在哪里:那个版本的 gem 与 rails 5.2 不兼容
        • 也许有更新版本的 gem? (检查。)否则,您可以自己更新 gem,或降级 rails。
        • 谢谢汤姆。确实,情况似乎如此,但是不再支持
        猜你喜欢
        • 2012-12-03
        • 2018-03-02
        • 2017-02-21
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2017-07-29
        • 2016-07-03
        • 2016-09-18
        相关资源
        最近更新 更多