【问题标题】:Rails 6 - Nokogiri LoadError conflict between development and production (x86_64-darwin & x86_64-linux)Rails 6 - 开发和生产之间的 Nokogiri LoadError 冲突(x86_64-darwin 和 x86_64-linux)
【发布时间】:2021-06-14 18:56:13
【问题描述】:

当我尝试使用 capistrano gem 进行部署时,我得到:

rake stderr: rake aborted!
LoadError: cannot load such file -- nokogiri/nokogiri

在我的Gemfile.lock 中,我可以看到nokogiri (1.11.2-x86_64-darwin) 安装了nokogiri (1.11.2-x86_64-darwin),因为我使用mac 进行开发,而当我在我的生产中使用gem list 时,ubuntu 我明白了nokogiri (1.11.2 x86_64-linux).

基于 SO 上的一个答案,我从 nokogiri (1.11.2-x86_64-darwin) 中删除了 -x86_64-darwin 但这给了我:

Downloading nokogiri-1.11.2 revealed dependencies not in the API or the lockfile (mini_portile2 (~> 2.5.0)).
Either installing with `--full-index` or running `bundle update nokogiri` should fix the problem.

我跑了bundle update nokogiri 没有运气,它只说:Bundler attempted to update nokogiri but its version stayed the same

我知道这个问题可能会发生,因为我本地的 nokogiri 用于 mac,而开发用于 Linux。

我不确定我能做些什么来解决这个问题。感谢您提供任何反馈。

Rails: 6.1.3
Ruby: 2.5.8

【问题讨论】:

    标签: ruby-on-rails ruby capistrano nokogiri darwin


    【解决方案1】:

    我也遇到过类似的问题,this 帮助了我。

    【讨论】:

      猜你喜欢
      • 2012-11-27
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-03-14
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多