【问题标题】:I can't run "bundle install" due to libv8由于 libv8,我无法运行“捆绑安装”
【发布时间】:2020-05-25 02:18:24
【问题描述】:

我在 Windows 10 上运行它。 我正在尝试构建这个存储库(如果 Gemfile 和 Gemfile.lock 有帮助): https://github.com/huginn/huginn

Error:

C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/libv8-7.3.492.27.1/ext/libv8

C:/Ruby24-x64/bin/ruby.exe -r ./siteconf20200209-30680-1j9g8t0.rb extconf.rb

creating Makefile

The system cannot find the path specified.

The system cannot find the path specified.

The system cannot find the path specified.

C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/libv8-7.3.492.27.1/ext/libv8/builder.rb:57:in

`setup_python!': libv8 requires python 2 to be installed in order to build, but

it is currently not available (RuntimeError)

from

C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/libv8-7.3.492.27.1/ext/libv8/builder.rb:39:in

`build_libv8!'

from

C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/libv8-7.3.492.27.1/ext/libv8/location.rb:24:in

`install!'

from extconf.rb:7:in `<main>'

extconf failed, exit code 1

Gem files will remain installed in

C:/Ruby24-x64/lib/ruby/gems/2.4.0/gems/libv8-7.3.492.27.1 for inspection.

Results logged to

C:/Ruby24-x64/lib/ruby/gems/2.4.0/extensions/x64-mingw32/2.4.0/libv8-7.3.492.27.1/gem_make.out

An error occurred while installing libv8 (7.3.492.27.1), and Bundler cannot

continue.

Make sure that `gem install libv8 -v '7.3.492.27.1' --source

'https://rubygems.org/'` succeeds before bundling.

In Gemfile:

mini_racer was resolved to 0.2.9, which depends on

libv8

无论我用谷歌搜索什么,最佳答案总是相同的: 我都试过了:

gem install libv8 -v '3.16.14.1' -- --with-system-v8

gem install libv8 -v '3.11.8.13' -- --with-system-v8

gem install libv8 --version '3.11.8.17' on ruby (windows)
libv8 required python 2 to be installed in order to build - Windows
therubyracer - Gem::Ext::BuildError: ERROR: Failed to build gem native extension

我看到 Gemfile.lock 有这个

libv8 (7.3.492.27.1) 
..... 
mini_racer (0.2.9) 
  libv8 (>= 6.9.411)

所以我假设 Gemfile.lock 导致它安装了我不想要的版本。但我不知道如何解决这个问题。

我还在学习 Ruby,这是我决定开始尝试的第一个大项目。

我的电脑上也有 Python 2。所以我不确定为什么它说它不存在。

【问题讨论】:

    标签: ruby-on-rails ruby


    【解决方案1】:

    如果您查看 Gemfile,它会指出 mini_racer gem(这里的症结所在)是可选的 gem,因此可能值得将其注释掉并再次尝试捆绑。看看你是否到达任何地方。

    此外,如果 mini_racer 类似于 therubyracer,则在 Windows 上并不真正需要它,因为它内置了 JScript,因此它不需要另一个 javascript 运行时。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2012-02-20
      • 2013-09-09
      • 2015-07-28
      • 1970-01-01
      • 1970-01-01
      • 2023-02-10
      相关资源
      最近更新 更多