[英]Jekyll gem breaks when adding Gemfile
我在 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
(在 WSL 上完全相同,除了它是libglib-2.0-0.so
)
我的 gemfile 是這樣的:
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
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.