【发布时间】: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