安装 libv8 与 mini_racer 一起使用时遇到问题(使用 Git bash 的 github 页面站点项目)

问题描述 投票:0回答:1
  1. 大家好,我正在使用 github 页面网站开发我的第一个网站。我一直在 Youtube 上关注本教程。我从另一个人那里分叉了一个主题用于我的项目。经过分叉和一些编辑以通过 VS 代码使其个性化后,我运行了
    bundle install
    (这与视频中的 @6.40 是同一步骤)。我写这篇文章的目标是能够在我的机器上继续进行
    bundle install
    bundle exec jekyll

我的系统/版本是:

  • Windows 11,版本 22H2
  • 宝石3.5.6
  • ruby 3.2.3(2024-01-18 修订版 52bb2ac0a6)[x64-mingw-ucrt]
  • 杰基尔4.3.3

之后我得到了这个错误:

An error occurred while installing libv8-node (18.16.0.0), and Bundler cannot
continue.

In Gemfile:
  mini_racer was resolved to 0.8.0, which depends on
    libv8-node

所以我查找了如何解决这个问题。大多数人说使用

gem install libv8 -v '3.16.14.3' -- --with-system-v8
我尝试过,它有效并返回如下:

gem install libv8 -v '3.16.14.3' -- --with-system-v8 
Temporarily enhancing PATH for MSYS/MINGW... Building native extensions with: '--with-system-v8' This could take a while...
Successfully installed libv8-3.16.14.3 Parsing documentation for libv8-3.16.14.3 Done installing documentation for libv8 after 0 seconds 1 gem installed

之后我又跑了

bundle install
。关于 mini_racer 显示相同的错误。我尝试过的其他事情是
gem update --system
gem update --system
(显示安装的最新版本),我还尝试在 VS 代码中指定
gem 'mini_racer', '0.8.0'
及其在我的 Gem 文件中查找的版本。这些都不适合我。

有什么建议吗?抱歉,如果这是一个愚蠢的问题,但我一直在尝试寻找解决方案的互联网资源根本无法解决问题。谢谢大家


我的 Gemfile 看起来像这样 enter image description here

ruby installation rubygems jekyll
1个回答
0
投票

尝试这个解决方案,导致此错误的原因有很多,但这个看起来更适合您的情况https://github.com/alshedivat/al-folio/issues/691#issuecomment-1146779021

© www.soinside.com 2019 - 2024. All rights reserved.