使用bundler更新puma gem时出现错误



我试图通过这个命令在我的应用程序中使用bundle更新puma gem

bundle update puma

但是显示了这个错误

Your bundle is locked to elasticsearch-model (7.1.1) from https://github.com/elastic/elasticsearch-rails.git (at 6.x@606f348), but that version can no longer be found in that source. That means the author of elasticsearch-model (7.1.1) has removed it.
You'll need to update your bundle to a version other than elasticsearch-model (7.1.1) that hasn't been removed in order to install.

我不确定这是什么意思。当我在gemfile中搜索"elasticsearch";我只得到一个匹配项

gem "elasticsearch-persistence", git: "https://github.com/elastic/elasticsearch-rails.git", branch: "6.x"

同样,当我搜索"elasticsearch";Gemfile内部。锁在这里是匹配

GIT
remote: https://github.com/elastic/elasticsearch-rails.git
revision: 606f3482e298fab0afc5a083468f23ec7464b0d3
branch: 6.x
specs:
elasticsearch-persistence (6.1.0)
activemodel (> 4)
activesupport (> 4)
elasticsearch (~> 6)
elasticsearch-model (>= 5)
hashie
elasticsearch (6.8.1)
elasticsearch-api (= 6.8.1)
elasticsearch-transport (= 6.8.1)
elasticsearch-api (6.8.1)
multi_json
elasticsearch-model (7.1.1)
activesupport (> 3)
elasticsearch (> 1)
hashie
elasticsearch-transport (6.8.1)
elasticsearch-persistence!

知道如何解决这个错误吗?由于

elasticsearch-modelgem是elasticsearch-persistencegem的依赖项。因为Gemfile只有elasticsearch-persistence的一个条目,所以绑定器将尝试加载它能找到的elasticsearch-modelgem的最新版本。

此外,你不从Rubygems加载elasticsearch-persistence,而是直接从他们的GitHub存储库加载。但是,绑定器会从Rubygems中加载elasticsearch-model依赖项。

我同意错误信息非常令人困惑。我猜最新版本的elasticsearch-model根本不兼容旧版本的elasticsearch-persistence从GitHub。

我建议将Gemfile中的elasticsearch-persistence行更改为以下内容,以确保两个gem从相同的源加载到相同的版本中(如README中建议的):

gem 'elasticsearch-model', github: 'elastic/elasticsearch-rails', branch: '6.x'
gem 'elasticsearch-persistence', github: 'elastic/elasticsearch-rails', branch: '6.x'

然后再试着运行bundle install

相关内容

  • 没有找到相关文章

最新更新