首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >依赖错误:哎呀!看起来您没有安装_plugins/lunrjs/jekyll_lunr_js_search.rb或它的依赖项之一。

依赖错误:哎呀!看起来您没有安装_plugins/lunrjs/jekyll_lunr_js_search.rb或它的依赖项之一。
EN

Stack Overflow用户
提问于 2017-03-08 16:46:17
回答 1查看 643关注 0票数 1

在使用插件 杰基尔 编译Jekyll项目时总是会在windows中得到以下错误。但是它是在gitlabci.上编译的。

依赖错误:哎呀!看起来您没有安装D:/myproject/_plugins/lunrjs/jekyll_lunr_js_search.rb或它的依赖项之一。为了使用目前配置的Jekyll,您需要安装这个gem。Ruby的全部错误信息是:“无法加载这样的文件-- v8”,如果您遇到麻烦,您可以在https://jekyllrb.com/help/找到有用的资源!

使用gem install jekyll-lunr-js-search 时出现以下错误:

代码语言:javascript
复制
C:\MyProj>gem install jekyll-lunr-js-search
Fetching: json-2.0.3.gem (100%)
Temporarily enhancing PATH to include DevKit...
Building native extensions.  This could take a while...
Successfully installed json-2.0.3
Fetching: ref-2.0.0.gem (100%)
Successfully installed ref-2.0.0
Fetching: libv8-3.16.14.19.gem (100%)
Building native extensions.  This could take a while...
ERROR:  Error installing jekyll-lunr-js-search:
        ERROR: Failed to build gem native extension.

    current directory: C:/APPs/Ruby23-x64/lib/ruby/gems/2.3.0/gems/libv8-3.16.14.19/ext/libv8
C:/APPs/Ruby23-x64/bin/ruby.exe -r ./siteconf20170310-14120-1y669dw.rb extconf.rb
creating Makefile
The system cannot find the path specified.
C:/APPs/Ruby23-x64/lib/ruby/gems/2.3.0/gems/libv8-3.16.14.19/ext/libv8/builder.rb:86:in `setup_python!': libv8 requires python 2 to be installed in order to build, but it is currently 3.4.4 (RuntimeError)
        from C:/APPs/Ruby23-x64/lib/ruby/gems/2.3.0/gems/libv8-3.16.14.19/ext/libv8/builder.rb:53:in `build_libv8!'
        from C:/APPs/Ruby23-x64/lib/ruby/gems/2.3.0/gems/libv8-3.16.14.19/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:/APPs/Ruby23-x64/lib/ruby/gems/2.3.0/gems/libv8-3.16.14.19 for inspection.
Results logged to C:/APPs/Ruby23-x64/lib/ruby/gems/2.3.0/extensions/x64-mingw32/2.3.0/libv8-3.16.14.19/gem_make.out

**文件内容(gem_make.out)**

代码语言:javascript
复制
current directory: C:/APPs/Ruby23-x64/lib/ruby/gems/2.3.0/gems/libv8-3.16.14.19/ext/libv8
C:/APPs/Ruby23-x64/bin/ruby.exe -r ./siteconf20170310-14120-1y669dw.rb extconf.rb
creating Makefile
The system cannot find the path specified.
C:/APPs/Ruby23-x64/lib/ruby/gems/2.3.0/gems/libv8-3.16.14.19/ext/libv8/builder.rb:86:in `setup_python!': libv8 requires python 2 to be installed in order to build, but it is currently 3.4.4 (RuntimeError)
    from C:/APPs/Ruby23-x64/lib/ruby/gems/2.3.0/gems/libv8-3.16.14.19/ext/libv8/builder.rb:53:in `build_libv8!'
    from C:/APPs/Ruby23-x64/lib/ruby/gems/2.3.0/gems/libv8-3.16.14.19/ext/libv8/location.rb:24:in `install!'
    from extconf.rb:7:in `<main>'

extconf failed, exit code 1

注意:--我已经安装了pythonv2和v3,并且运行良好。使用py -2输出测试python如下:

代码语言:javascript
复制
C:\>py -2
Python 2.7.13 (v2.7.13:a06454b1afa1, Dec 17 2016, 20:53:40) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>>
EN

回答 1

Stack Overflow用户

发布于 2017-03-09 02:21:03

如果您查看lib目录,您将看到ruby文件是jekyll-lunr-js-search.rb而不是jekyll_lunr_js_search.rb。此外,它还可以作为Rubygem包使用。

只需将gem添加到:jekyll_plugins组中的Gemfile中,运行bundle install并继续构建/服务于Jekyll。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/42677101

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档