macOS Monterey (12.3) 上的 Jekyll 问题

发布于 2025-01-17 03:22:33 字数 4195 浏览 2 评论 0原文

我最近升级到 macOS 12.3,这破坏了我的 jekyll 网站。当我升级后第一次尝试构建网站时,我的计算机(带有 Intel 芯片的 Macbook Air)会崩溃。

到目前为止,我已经升级了自制程序并解决了所有警告:

$ brew -v
Homebrew 3.4.3
Homebrew/homebrew-core (git revision 0d76941ceaf; last commit 2022-03-26)
$ brew doctor
Your system is ready to brew. 

我已经使用 rbenv 安装了 3.0.2 版本的 ruby​​:

$ ruby -v
ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-darwin21]

我按照 https://jekyllrb.com/tutorials/using-jekyll-with-bundler/ 创建一个新站点为了将其与导致我的计算机崩溃的旧网站进行比较。我尽力确保旧站点目录的内容与新站点目录相匹配。新站点已构建,但当我尝试构建旧站点时出现以下错误:

$ bundle exec jekyll s -t
Generating... 
bundler: failed to load command: jekyll (/Users/hepting/Sites/dhhepting.github.io/vendor/bundle/ruby/3.0.0/bin/jekyll)
/Users/hepting/.rbenv/versions/3.0.2/lib/ruby/3.0.0/fileutils.rb:1466:in `unlink': Operation not permitted @ apply2files - /Users/hepting/Sites/dhhepting.github.io/_site/research/works (Errno::EPERM)

Jekyll is there:

$ /Users/hepting/Sites/dhhepting.github.io/vendor/bundle/ruby/3.0.0/bin/jekyll -v
jekyll 4.2.2

This is the "research/works" directory for my old site:

$ ls -l research/works
total 8
drwxr-xr-x  4 hepting  staff  128 23 Oct  2018 0_nonweb
-rw-r--r--  1 hepting  staff  798 21 Jan  2020 index.md

and this index.md file contains (part):

---
layout: w_collection
title: Collected Works
redirect_from:
  - /research/works.html
breadcrumb: Collected Works
collection: works
---

I在我的 _config.yml 中定义以下内容用于研究/工作。我不认为问题出在这里,因为多年来它一直运行良好。在网络上,该页面位于 http://www2.cs.uregina。 ca/~hepting/research/works/

collections:
  - works

collections:
  works:
    output: true
    permalink: /research/:collection/:title:output_ext

这是我用于两个站点的 Gemfile:

source "https://rubygems.org"

# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
#     bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.

gem "jekyll", "~> 4.2.2"
gem "minima", "~> 2.5"
gem "webrick", "~> 1.7"
gem "nokogiri", '>= 1.12.5'
gem 'html-proofer', '>= 3.15.3'

group :jekyll_plugins do
   gem 'jekyll-seo-tag'
   gem 'jekyll-sitemap'
   gem 'jekyll-redirect-from'
end

我有以下 .bundle/config:

---
BUNDLE_PATH: "vendor/bundle"

当我执行“捆绑安装”时(在旧站点目录):

$ bundle install
Using public_suffix 4.0.6
Using addressable 2.8.0
Using bundler 2.3.10
Using colorator 1.1.0
Using concurrent-ruby 1.1.10
Using eventmachine 1.2.7
Using http_parser.rb 0.8.0
Using em-websocket 0.5.3
Using ffi 1.15.5
Using ethon 0.15.0
Using forwardable-extended 2.6.0
Using mercenary 0.4.0
Using mini_portile2 2.8.0
Using racc 1.6.0
Using nokogiri 1.13.3 (x86_64-darwin)
Using parallel 1.22.1
Using rainbow 3.1.1
Using typhoeus 1.4.0
Using yell 2.2.2
Using html-proofer 3.19.3
Using i18n 1.10.0
Using sassc 2.4.0
Using jekyll-sass-converter 2.2.0
Using rb-fsevent 0.11.1
Using rb-inotify 0.10.1
Using listen 3.7.1
Using jekyll-watch 2.2.1
Using rexml 3.2.5
Using kramdown 2.3.2
Using kramdown-parser-gfm 1.1.0
Using liquid 4.0.3
Using pathutil 0.16.2
Using rouge 3.28.0
Using safe_yaml 1.0.5
Using unicode-display_width 1.8.0
Using terminal-table 2.0.0
Using jekyll 4.2.2
Using jekyll-feed 0.16.0
Using jekyll-redirect-from 0.16.0
Using jekyll-seo-tag 2.8.0
Using jekyll-sitemap 1.4.0
Using minima 2.5.1
Using webrick 1.7.0
Bundle complete! 8 Gemfile dependencies, 43 gems now installed.
Bundled gems are installed into `./vendor/bundle`

当我执行“捆绑安装”(在新站点目录中)时:

Bundle complete! 8 Gemfile dependencies, 42 gems now installed.
Bundled gems are installed into `./vendor/bundle`

差异似乎是“mini_portile2 2.8.0”。我尝试删除它,但它被“捆绑安装”拉回。

关于如何解决构建旧网站的问题有什么建议吗?有什么我没有提供的信息吗?

此致, 达里尔

I upgraded to macOS 12.3 recently and that broke my jekyll website. When I first tried to build my website after the upgrade, my computer (Macbook Air with Intel chip) would crash.

So far, I have upgraded homebrew and addressed all warnings:

$ brew -v
Homebrew 3.4.3
Homebrew/homebrew-core (git revision 0d76941ceaf; last commit 2022-03-26)
$ brew doctor
Your system is ready to brew. 

I have installed version 3.0.2 of ruby using rbenv:

$ ruby -v
ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [x86_64-darwin21]

I followed the steps outlined at https://jekyllrb.com/tutorials/using-jekyll-with-bundler/ to create a new site in order to compare it to old site that has been crashing my computer. I endeavoured to ensure that the contents of my old site directory matched the new site directory. The new site builds, but I get following error when I try to build the old site:

$ bundle exec jekyll s -t
Generating... 
bundler: failed to load command: jekyll (/Users/hepting/Sites/dhhepting.github.io/vendor/bundle/ruby/3.0.0/bin/jekyll)
/Users/hepting/.rbenv/versions/3.0.2/lib/ruby/3.0.0/fileutils.rb:1466:in `unlink': Operation not permitted @ apply2files - /Users/hepting/Sites/dhhepting.github.io/_site/research/works (Errno::EPERM)

Jekyll is there:

$ /Users/hepting/Sites/dhhepting.github.io/vendor/bundle/ruby/3.0.0/bin/jekyll -v
jekyll 4.2.2

This is the "research/works" directory for my old site:

$ ls -l research/works
total 8
drwxr-xr-x  4 hepting  staff  128 23 Oct  2018 0_nonweb
-rw-r--r--  1 hepting  staff  798 21 Jan  2020 index.md

and this index.md file contains (in part):

---
layout: w_collection
title: Collected Works
redirect_from:
  - /research/works.html
breadcrumb: Collected Works
collection: works
---

I have the following defined in my _config.yml for research/works. I didn't think that the problem was here since it has worked fine for years. On the web, the page is at http://www2.cs.uregina.ca/~hepting/research/works/

collections:
  - works

collections:
  works:
    output: true
    permalink: /research/:collection/:title:output_ext

Here's the Gemfile that I use for both sites:

source "https://rubygems.org"

# When you want to use a different version, change it below, save the
# file and run `bundle install`. Run Jekyll with `bundle exec`, like so:
#
#     bundle exec jekyll serve
#
# This will help ensure the proper Jekyll version is running.

gem "jekyll", "~> 4.2.2"
gem "minima", "~> 2.5"
gem "webrick", "~> 1.7"
gem "nokogiri", '>= 1.12.5'
gem 'html-proofer', '>= 3.15.3'

group :jekyll_plugins do
   gem 'jekyll-seo-tag'
   gem 'jekyll-sitemap'
   gem 'jekyll-redirect-from'
end

I have the following .bundle/config:

---
BUNDLE_PATH: "vendor/bundle"

When I do "bundle install" (in the old site directory):

$ bundle install
Using public_suffix 4.0.6
Using addressable 2.8.0
Using bundler 2.3.10
Using colorator 1.1.0
Using concurrent-ruby 1.1.10
Using eventmachine 1.2.7
Using http_parser.rb 0.8.0
Using em-websocket 0.5.3
Using ffi 1.15.5
Using ethon 0.15.0
Using forwardable-extended 2.6.0
Using mercenary 0.4.0
Using mini_portile2 2.8.0
Using racc 1.6.0
Using nokogiri 1.13.3 (x86_64-darwin)
Using parallel 1.22.1
Using rainbow 3.1.1
Using typhoeus 1.4.0
Using yell 2.2.2
Using html-proofer 3.19.3
Using i18n 1.10.0
Using sassc 2.4.0
Using jekyll-sass-converter 2.2.0
Using rb-fsevent 0.11.1
Using rb-inotify 0.10.1
Using listen 3.7.1
Using jekyll-watch 2.2.1
Using rexml 3.2.5
Using kramdown 2.3.2
Using kramdown-parser-gfm 1.1.0
Using liquid 4.0.3
Using pathutil 0.16.2
Using rouge 3.28.0
Using safe_yaml 1.0.5
Using unicode-display_width 1.8.0
Using terminal-table 2.0.0
Using jekyll 4.2.2
Using jekyll-feed 0.16.0
Using jekyll-redirect-from 0.16.0
Using jekyll-seo-tag 2.8.0
Using jekyll-sitemap 1.4.0
Using minima 2.5.1
Using webrick 1.7.0
Bundle complete! 8 Gemfile dependencies, 43 gems now installed.
Bundled gems are installed into `./vendor/bundle`

When I do "bundle install" (in the new site directory):

Bundle complete! 8 Gemfile dependencies, 42 gems now installed.
Bundled gems are installed into `./vendor/bundle`

The difference appears to be "mini_portile2 2.8.0". I've tried to remove it but it gets pulled back in with "bundle install".

Any suggestions about how to resolve my problem building my old site? Any information that I didn't provide?

Best regards,
Daryl

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

提笔落墨 2025-01-24 03:22:33

我能够通过隐藏与“研究/作品”(集合)相关的内容来构建网站,这感觉像是一个不完整的答案。

我认为我的答案现在更完整了:看来子目录现在会导致集合中出现问题(至少是带有输出的集合)。我删除了该子目录,以便 _works 集合中的所有项目都直接包含在 _works 目录中,并且我的网站现在正在像以前一样构建。

I was able to get the site to build by hiding the content related to "research/works" (a collection) and that felt like an incomplete answer.

I think that my answer is more complete now: it seems that subdirectories now cause problems within collections (at least the ones with output). I removed the subdirectory so that all items in my _works collection are directly contained in the _works directory and my site is now building as it once was.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文