由于依赖关系,我无法安装 gem 机车



正如照片中所说,机车的最新版本需要Ruby<但是Ruby的所有稳定版本都是>3.如何安装机车?我在使用https://doc.locomotivecms.com/docs/quick-start但是它不能帮我输入图像描述

我使用的是gemfile和bundler install。我还尝试使用命令

gem install locomotivecms_wagon
It was installed but when I type

旅行车版本

It says is 1.58 but i need 3.0.2 at least and I don't know hot to update it.
This is my gemfile and gemfile.lock
[[enter image description here](https://i.stack.imgur.com/mmG9V.png)
[enter image description here](https://i.stack.imgur.com/lL7bm.png)
[enter image description here](https://i.stack.imgur.com/qlF1o.png)

简单的回答是:您不能在Ruby 3中运行它。

locomotivecmsgem依赖于locomotivecms_steamgem时,即使最新版本的locomotivecms_steam也不支持Ruby 3.0,那么你需要将Ruby版本降级到2.7.7

在过去的几年中,locomotivecms_steam没有发布很多版本,这使得他们不太可能很快解决这个依赖问题。

这意味着你的选择是:

  • 最近发布了ruby2.7.7的降级,这意味着它还没有完全没有维护,但它将在2023年3月底的大约2个月后结束生命。
  • 或者你可能想要考虑分叉gem并自己修复它以使其与Ruby 3.x一起运行。这可能很容易,而且gem与Ruby只有一些不兼容之处。但也有可能这很难,因此维护者还没有完成。

在这两种情况下,我建议寻找替代品,因为依赖于不再积极维护的gem或您必须自己维护的gem,听起来不像是一个好主意。

最新更新