我在jekyll有我的网站。一切正常,直到我做了点什么(不确定是什么)并且安装失败。
我已经在Ubuntu WSL和Windows本机ruby上尝试过,问题是相同的。我可以安装好宝石。 jekyll可以正常运行,但是如果我添加gemfile并在其他目录中再次运行jekyll(该文件夹中的bundle exec jekyll -v
甚至是jekyll -v
),则jekyll运行良好,如果删除Gemfile,jekyll也可以运行。
错误是:
bundle exec jekyll -v
Traceback (most recent call last):
23: from C:/tools/ruby26/bin/jekyll:23:in `<main>'
22: from C:/tools/ruby26/bin/jekyll:23:in `load'
21: from C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/jekyll-4.0.0/exe/jekyll:11:in `<top (required)>'
20: from C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/jekyll-4.0.0/lib/jekyll/plugin_manager.rb:53:in `require_from_bundler'
19: from C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/bundler-2.1.2/lib/bundler.rb:174:in `require'
18: from C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/bundler-2.1.2/lib/bundler/runtime.rb:58:in `require'
17: from C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/bundler-2.1.2/lib/bundler/runtime.rb:58:in `each'
16: from C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/bundler-2.1.2/lib/bundler/runtime.rb:69:in `block in require' 15: from C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/bundler-2.1.2/lib/bundler/runtime.rb:69:in `each'
14: from C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/bundler-2.1.2/lib/bundler/runtime.rb:74:in `block (2 levels) in require'
13: from C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/bundler-2.1.2/lib/bundler/runtime.rb:74:in `require'
12: from C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/jekyll-thumb-0.2.1/lib/jekyll-thumb.rb:1:in `<top (required)>' 11: from C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/jekyll-thumb-0.2.1/lib/jekyll-thumb.rb:1:in `require'
10: from C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/jekyll-thumb-0.2.1/lib/jekyll/thumb.rb:2:in `<top (required)>' 9: from C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/jekyll-thumb-0.2.1/lib/jekyll/thumb.rb:2:in `require'
8: from C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/jekyll-thumb-0.2.1/lib/jekyll/thumb/tag.rb:1:in `<top (required)>'
7: from C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/jekyll-thumb-0.2.1/lib/jekyll/thumb/tag.rb:1:in `require' 6: from C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/ruby-vips-2.0.16/lib/ruby-vips.rb:1:in `<top (required)>' 5: from C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/ruby-vips-2.0.16/lib/ruby-vips.rb:1:in `require'
4: from C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/ruby-vips-2.0.16/lib/vips.rb:36:in `<top (required)>'
3: from C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/ruby-vips-2.0.16/lib/vips.rb:45:in `<module:GLib>'
2: from C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/ffi-1.11.3-x64-mingw32/lib/ffi/library.rb:99:in `ffi_lib' 1: from C:/tools/ruby26/lib/ruby/gems/2.6.0/gems/ffi-1.11.3-x64-mingw32/lib/ffi/library.rb:99:in `map'
block in ffi_lib: Could not (LoadError) 'libglib-2.0-0.dll': Not found
(除libglib-2.0-0.so
以外,在WSL上完全相同)>
我的宝石文件是这个:
source "https://rubygems.org" # If you have any plugins, put them here! group :jekyll_plugins do gem "jekyll-paginate-v2" gem "jekyll-sitemap" gem "jekyll-org" gem "jekyll-thumb" gem "flickraw" end # Windows does not include zoneinfo files, so bundle the tzinfo-data gem gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
从我得出的结论来看,提供Gemfile时jekyll的版本(或其依赖项)已损坏,但是当我查看捆绑程序的输出时,它是手动安装的全局gem。我什至尝试将libglib-2.0-0.dll放入system32目录。
包装版本:
ruby: 2.6.5 [x64-mingw32]
bundler: 2.1.2
gem: 3.0.3
jekyll: 4.0.0
我在jekyll有我的网站。一切正常,直到我做了点什么(不确定是什么)并且安装失败。我已经在Ubuntu WSL和Windows本机ruby上尝试过这个,问题是一样的。我...
您在Gemfile中运行的Jekyll版本存在问题。您在本地拥有的服务器正在工作,因此您可以尝试一下。运行jekyll失败目录的jekyll -v
outside