bf2fc6cc711aee1a0c2a / architecture

Repository containing the architecture documents.
https://architecture.bf2.dev/
Apache License 2.0
5 stars 20 forks source link

Can't build site with Fedora's Ruby #47

Closed grdryn closed 2 years ago

grdryn commented 2 years ago

As mentioned in #46, I didn't manage to build the site on Fedora using the instructions in the README. At least the first issue seemed to be this, which indicates that the version of Jekyll that GH pages uses doesn't work with Ruby 3 (and that's the min version available on Fedora).

Instead of faffing about with Ruby on different operating systems, instructions to run in a container might be simpler? I tried doing that with the ubi8/ruby-27 image, but hit a litany of issues:

bash-4.4$ bundle exec jekyll serve Configuration file: /opt/app-root/src/_config.yml jekyll 3.9.0 | Error: No repo name found. Specify using PAGES_REPO_NWO environment variables, 'repository' in your configuration, or set up an 'origin' git remote pointing to your github.com repository. Traceback (most recent call last): 48: from /usr/bin/bundle:23:in `
' 47: from /usr/bin/bundle:23:in `load' 46: from /usr/share/gems/gems/bundler-2.2.24/libexec/bundle:34:in `' 45: from /usr/share/gems/gems/bundler-2.2.24/lib/bundler/friendly_errors.rb:128:in `with_friendly_errors' 44: from /usr/share/gems/gems/bundler-2.2.24/libexec/bundle:46:in `block in ' 43: from /usr/share/gems/gems/bundler-2.2.24/lib/bundler/cli.rb:25:in `start' 42: from /usr/share/gems/gems/bundler-2.2.24/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start' 41: from /usr/share/gems/gems/bundler-2.2.24/lib/bundler/cli.rb:31:in `dispatch' 40: from /usr/share/gems/gems/bundler-2.2.24/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch' 39: from /usr/share/gems/gems/bundler-2.2.24/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command' 38: from /usr/share/gems/gems/bundler-2.2.24/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run' 37: from /usr/share/gems/gems/bundler-2.2.24/lib/bundler/cli.rb:475:in `exec' 36: from /usr/share/gems/gems/bundler-2.2.24/lib/bundler/cli/exec.rb:28:in `run' 35: from /usr/share/gems/gems/bundler-2.2.24/lib/bundler/cli/exec.rb:63:in `kernel_load' 34: from /usr/share/gems/gems/bundler-2.2.24/lib/bundler/cli/exec.rb:63:in `load' 33: from /opt/app-root/src/bundle/ruby/2.7.0/bin/jekyll:23:in `' 32: from /opt/app-root/src/bundle/ruby/2.7.0/bin/jekyll:23:in `load' 31: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/exe/jekyll:15:in `' 30: from /opt/app-root/src/bundle/ruby/2.7.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program' 29: from /opt/app-root/src/bundle/ruby/2.7.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go' 28: from /opt/app-root/src/bundle/ruby/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute' 27: from /opt/app-root/src/bundle/ruby/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each' 26: from /opt/app-root/src/bundle/ruby/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute' 25: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/jekyll/commands/serve.rb:75:in `block (2 levels) in init_with_program' 24: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/jekyll/commands/serve.rb:93:in `start' 23: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/jekyll/commands/serve.rb:93:in `each' 22: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/jekyll/commands/serve.rb:93:in `block in start' 21: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/jekyll/commands/build.rb:30:in `process' 20: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/jekyll/commands/build.rb:30:in `new' 19: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/jekyll/site.rb:34:in `initialize' 18: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/jekyll/hooks.rb:102:in `trigger' 17: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/jekyll/hooks.rb:102:in `each' 16: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/jekyll/hooks.rb:103:in `block in trigger' 15: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-github-metadata-2.13.0/lib/jekyll-github-metadata/site_github_munger.rb:81:in `block in ' 14: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-github-metadata-2.13.0/lib/jekyll-github-metadata/site_github_munger.rb:20:in `munge!' 13: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-github-metadata-2.13.0/lib/jekyll-github-metadata/site_github_munger.rb:33:in `github_namespace' 12: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/jekyll/utils.rb:37:in `deep_merge_hashes' 11: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/jekyll/utils.rb:50:in `deep_merge_hashes!' 10: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/jekyll/utils.rb:318:in `merge_values' 9: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/jekyll/drops/drop.rb:186:in `merge!' 8: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/jekyll/drops/drop.rb:186:in `each_key' 7: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/jekyll/drops/drop.rb:188:in `block in merge!' 6: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/jekyll/drops/drop.rb:52:in `[]' 5: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/jekyll/drops/drop.rb:52:in `public_send' 4: from /usr/share/ruby/forwardable.rb:229:in `repository_url' 3: from /usr/share/ruby/forwardable.rb:235:in `repository' 2: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-github-metadata-2.13.0/lib/jekyll-github-metadata.rb:62:in `repository' 1: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-github-metadata-2.13.0/lib/jekyll-github-metadata/repository_finder.rb:33:in `nwo' /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-github-metadata-2.13.0/lib/jekyll-github-metadata/repository_finder.rb:29:in `block in nwo': No repo name found. Specify using PAGES_REPO_NWO environment variables, 'repository' in your configuration, or set up an 'origin' git remote pointing to your github.com repository. (Jekyll::GitHubMetadata::RepositoryFinder::NoRepositoryError) bash-4.4$ export PAGES_REPO_NWO=bf2fc6cc711aee1a0c2a/architecture bash-4.4$ bundle exec jekyll serve Configuration file: /opt/app-root/src/_config.yml GitHub Metadata: No GitHub API authentication could be found. Some fields may be missing or have incorrect data. fatal: not a git repository (or any of the parent directories): .git Source: /opt/app-root/src Destination: /opt/app-root/src/_site Incremental build: disabled. Enable with --incremental Generating... Error: could not read file /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb: Invalid date '<%= Time.now.strftime('%Y-%m-%d %H:%M:%S %z') %>': Document 'bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb' does not have a valid date in the YAML front matter. ERROR: YOUR SITE COULD NOT BE BUILT: ------------------------------------ Invalid date '<%= Time.now.strftime('%Y-%m-%d %H:%M:%S %z') %>': Document 'bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb' does not have a valid date in the YAML front matter. bash-4.4$ less bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb bash-4.4$ rm bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/site_template/_posts/0000-00-00-welcome-to-jekyll.markdown.erb bash-4.4$ bundle exec jekyll serve Configuration file: /opt/app-root/src/_config.yml GitHub Metadata: No GitHub API authentication could be found. Some fields may be missing or have incorrect data. fatal: not a git repository (or any of the parent directories): .git Source: /opt/app-root/src Destination: /opt/app-root/src/_site Incremental build: disabled. Enable with --incremental Generating... Jekyll Feed: Generating feed for posts Build Warning: Layout 'base' requested in bundle/ruby/2.7.0/gems/asciidoctor-2.0.17/README-zh_CN.adoc does not exist. Liquid Exception: Liquid syntax error (line 8): Unknown tag 'when' in bundle/ruby/2.7.0/gems/liquid-4.0.3/lib/liquid/locales/en.yml jekyll 3.9.0 | Error: Liquid syntax error (line 8): Unknown tag 'when' Traceback (most recent call last): 48: from /usr/bin/bundle:23:in `
' 47: from /usr/bin/bundle:23:in `load' 46: from /usr/share/gems/gems/bundler-2.2.24/libexec/bundle:34:in `' 45: from /usr/share/gems/gems/bundler-2.2.24/lib/bundler/friendly_errors.rb:128:in `with_friendly_errors' 44: from /usr/share/gems/gems/bundler-2.2.24/libexec/bundle:46:in `block in ' 43: from /usr/share/gems/gems/bundler-2.2.24/lib/bundler/cli.rb:25:in `start' 42: from /usr/share/gems/gems/bundler-2.2.24/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start' 41: from /usr/share/gems/gems/bundler-2.2.24/lib/bundler/cli.rb:31:in `dispatch' 40: from /usr/share/gems/gems/bundler-2.2.24/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch' 39: from /usr/share/gems/gems/bundler-2.2.24/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command' 38: from /usr/share/gems/gems/bundler-2.2.24/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run' 37: from /usr/share/gems/gems/bundler-2.2.24/lib/bundler/cli.rb:475:in `exec' 36: from /usr/share/gems/gems/bundler-2.2.24/lib/bundler/cli/exec.rb:28:in `run' 35: from /usr/share/gems/gems/bundler-2.2.24/lib/bundler/cli/exec.rb:63:in `kernel_load' 34: from /usr/share/gems/gems/bundler-2.2.24/lib/bundler/cli/exec.rb:63:in `load' 33: from /opt/app-root/src/bundle/ruby/2.7.0/bin/jekyll:23:in `' 32: from /opt/app-root/src/bundle/ruby/2.7.0/bin/jekyll:23:in `load' 31: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/exe/jekyll:15:in `' 30: from /opt/app-root/src/bundle/ruby/2.7.0/gems/mercenary-0.3.6/lib/mercenary.rb:19:in `program' 29: from /opt/app-root/src/bundle/ruby/2.7.0/gems/mercenary-0.3.6/lib/mercenary/program.rb:42:in `go' 28: from /opt/app-root/src/bundle/ruby/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `execute' 27: from /opt/app-root/src/bundle/ruby/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `each' 26: from /opt/app-root/src/bundle/ruby/2.7.0/gems/mercenary-0.3.6/lib/mercenary/command.rb:220:in `block in execute' 25: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/jekyll/commands/serve.rb:75:in `block (2 levels) in init_with_program' 24: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/jekyll/commands/serve.rb:93:in `start' 23: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/jekyll/commands/serve.rb:93:in `each' 22: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/jekyll/commands/serve.rb:93:in `block in start' 21: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/jekyll/commands/build.rb:36:in `process' 20: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/jekyll/commands/build.rb:65:in `build' 19: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/jekyll/command.rb:28:in `process_site' 18: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/jekyll/site.rb:71:in `process' 17: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/jekyll/site.rb:192:in `render' 16: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/jekyll/site.rb:471:in `render_pages' 15: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/jekyll/site.rb:471:in `each' 14: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/jekyll/site.rb:472:in `block in render_pages' 13: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/jekyll/site.rb:479:in `render_regenerated' 12: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/jekyll/renderer.rb:62:in `run' 11: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/jekyll/renderer.rb:79:in `render_document' 10: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/jekyll/renderer.rb:121:in `render_liquid' 9: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/jekyll/liquid_renderer/file.rb:12:in `parse' 8: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/jekyll/liquid_renderer/file.rb:49:in `measure_time' 7: from /opt/app-root/src/bundle/ruby/2.7.0/gems/jekyll-3.9.0/lib/jekyll/liquid_renderer/file.rb:13:in `block in parse' 6: from /opt/app-root/src/bundle/ruby/2.7.0/gems/liquid-4.0.3/lib/liquid/template.rb:116:in `parse' 5: from /opt/app-root/src/bundle/ruby/2.7.0/gems/liquid-4.0.3/lib/liquid/template.rb:132:in `parse' 4: from /opt/app-root/src/bundle/ruby/2.7.0/gems/liquid-4.0.3/lib/liquid/document.rb:5:in `parse' 3: from /opt/app-root/src/bundle/ruby/2.7.0/gems/liquid-4.0.3/lib/liquid/document.rb:10:in `parse' 2: from /opt/app-root/src/bundle/ruby/2.7.0/gems/liquid-4.0.3/lib/liquid/block_body.rb:32:in `parse' 1: from /opt/app-root/src/bundle/ruby/2.7.0/gems/liquid-4.0.3/lib/liquid/document.rb:11:in `block in parse' /opt/app-root/src/bundle/ruby/2.7.0/gems/liquid-4.0.3/lib/liquid/document.rb:23:in `unknown_tag': Liquid syntax error (line 8): Unknown tag 'when' (Liquid::SyntaxError) bash-4.4$ less bundle/ruby/2.7.0/gems/liquid-4.0.3/lib/liquid/locales/en.yml bash-4.4$ exit

Maybe updating to a newer Jekyll might help? I don't know enough about GH pages to know whether it's a hard requirement to use that Jekyll 3.9.0 version?

grdryn commented 2 years ago

@tombentley @wtrocki do you know of a working container that can be used to build the site locally, or should I attempt to create one? Or should I try to migrate this project to a newer Jekyll/Ruby?

wtrocki commented 2 years ago

I'm not decision maker but can provide context. Github actions uses that version because that is the only version that works - I could update to latest but that requires jeckyl update

Maybe updating to a newer Jekyll might help?

Yes. That is what we can do, but we need volunteer who can do it - not sure how much work is involved.

grdryn commented 2 years ago

Maybe updating to a newer Jekyll might help?

Yes. That is what we can do, but we need volunteer who can do it - not sure how much work is involved.

@wtrocki I'll try to find some time to try it out, unless there are objections from others :slightly_smiling_face:

wtrocki commented 2 years ago

@tombentley is the ultimate approver on this topic :D

tombentley commented 2 years ago

Aside: I've always found Ruby to be afflicted by XKCD-1987-type problem. So if we had a container for people to reproducibly build locally that would be great @grdryn. I don't have objections to updating to a newer Jekyll if the github action that builds the site can work with that.

grdryn commented 2 years ago

@tombentley Yes, that's a great illustration of the problem! :slightly_smiling_face:

Okay, I'll try to focus initially on a container image. If I find that that's made easier by a new Jekyll, and getting that working is straightforward on GitHub Actions, then I'll try that.

tombentley commented 2 years ago

Brilliant, thank you!

wtrocki commented 2 years ago

Github actions is using container so maybe it can be reused?