Hugo + Asciidoc + RVM + CloudFlare Pages build issue

Hi,
I migrated with success from 0.89.0 to 0.98.0 in my windows 10 machine, I added this configuration:

[security]
  [security.exec]
    allow = ['^dart-sass-embedded$', '^go$', '^npx$', '^postcss$', '^asciidoctor$']

Environment

HUGO_VERSION | 0.98.0
NODE_VERSION | 16.15.0
RUBY_VERSION | 2.7.6

When I tried to deploy on CloudFlarePages runner, I got an error, It seems to be a PATH issue:

Get asciidoctor path
/opt/buildhome/.rvm/gems/ruby-2.7.6/gems/asciidoctor-2.0.17/lib/asciidoctor.rb
...
page/uses/index.adoc: from /opt/buildhome/.rvm/gems/ruby-2.7.0/bin/asciidoctor:23:in `<main>'

please check the complete logs below.

0890_OK.log

0980_KO.log

I’m waiting for feedbacks

Thanks

I think this is triggered by RVM.
In your site config, please add GEM_PATH to security.exec.osEnv

[security.exec]
osEnv = ['(?i)^(PATH|PATHEXT|APPDATA|TMP|TEMP|TERM|GEM_PATH)$']

We may need to add additional env vars, but let’s start with this.

1 Like

Thank you so much, it works.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.