Giter Club home page Giter Club logo

Comments (3)

foonathan avatar foonathan commented on September 20, 2024

Just fixed by hand editing the python script, as the first python on my path is still Python 2. Just changing the shebang temporarily to python3 does the trick.

Yeah, I'm using Arch where python means python3. ;)

I don't understand this tricks for generating the website. :-) I know AsciiDoctor well (and I'm glad that you use it!), but I think this is just related to Hugo or the custom build.

That's odd. What version of hugo are you using? For reference, this is how CI does it:

steps:
- uses: actions/checkout@v2
- name: Install asciidoctor
run: sudo gem install asciidoctor pygments.rb
- name: Install hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: 'latest'
extended: true
- name: Create Build Environment
run: cmake -E make_directory build
- name: Configure
working-directory: build/
run: cmake $GITHUB_WORKSPACE -DLEXY_BUILD_DOCS=ON -DLEXY_BUILD_EXAMPLES=OFF -DLEXY_BUILD_TESTS=OFF
- name: Build docs
working-directory: build/
run: cmake --build . --target lexy_docs

from lexy.

suy avatar suy commented on September 20, 2024

I was using the hugo package from the (not-so-new) linux distro. After getting the latest version from Github releases, I get a different error now (I was building with ninja lexy_docs before, but using cmake --build like in the snippet from the CI yields the same):

[0/2] Re-checking globbed directories...
[5/5] cd /home/alex/projects/3rdparty/lexy/docs && /home/alex/local/bin/hugo --minify
FAILED: docs/CMakeFiles/lexy_docs /home/alex/projects/3rdparty/lexy/build/docs/CMakeFiles/lexy_docs 
cd /home/alex/projects/3rdparty/lexy/docs && /home/alex/local/bin/hugo --minify
Start building sites … 
hugo v0.108.0-a0d64a46e36dd2f503bfd5ba1a5807b900df231d+extended linux/amd64 BuildDate=2022-12-06T13:37:56Z VendorInfo=gohugoio
ERROR 2022/12/13 17:36:58 benchmark_json.adoc: /usr/lib/ruby/2.7.0/rubygems.rb:275:in `find_spec_for_exe': can't find gem asciidoctor (>= 0.a) with executable asciidoctor (Gem::GemNotFoundException)
ERROR 2022/12/13 17:36:58 benchmark_json.adoc: from /usr/lib/ruby/2.7.0/rubygems.rb:294:in `activate_bin_path'
ERROR 2022/12/13 17:36:58 benchmark_json.adoc: from /home/alex/local/gems/bin/asciidoctor:23:in `<main>'
ERROR 2022/12/13 17:36:58 asciidoctor rendering benchmark_json.adoc: failed to execute binary "asciidoctor" with args [-a source-highlighter=pygments --no-header-footer -]: /usr/lib/ruby/2.7.0/rubygems.rb:275:in `find_spec_for_exe': can't find gem asciidoctor (>= 0.a) with executable asciidoctor (Gem::GemNotFoundException)
        from /usr/lib/ruby/2.7.0/rubygems.rb:294:in `activate_bin_path'
        from /home/alex/local/gems/bin/asciidoctor:23:in `<main>'

The last lines are repeated many times. Invoking asciidoctor by itself on any adoc file works fine. I just have set GEM_HOME to ~/local/gems to have all this extra packages in a separate directory without root access. I'm not sure if Hugo does some sanitizing to the environment, or if it's a way of invoking the asciidoctor program detecting it from system Ruby that doesn't work.

Anyway, it's probably not too important, as maybe it's an upstream issue in Hugo or Ruby, and my setup maybe it's not so common, so feel free to close the issue. :)

Thank you!

from lexy.

foonathan avatar foonathan commented on September 20, 2024

Anyway, it's probably not too important, as maybe it's an upstream issue in Hugo or Ruby, and my setup maybe it's not so common, so feel free to close the issue. :)

Ok :D

from lexy.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.