Mention all the requirements for MiniRacer on TruffleRuby (#257)

Raise there instead of waiting for the `@context.eval` below, for a clearer error.
This commit is contained in:
Benoit Daloze 2022-08-17 02:45:08 +02:00 committed by GitHub
parent 9935d5a65a
commit 719abdb1a4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -71,7 +71,9 @@ module MiniRacer
end
unless Polyglot.languages.include? "js"
warn "You also need to install the 'js' component with 'gu install js' on GraalVM 22.2+", uplevel: 0 if $VERBOSE
raise "The language 'js' is not available, you likely need to `export TRUFFLERUBYOPT='--jvm --polyglot'`\n" \
"You also need to install the 'js' component with 'gu install js' on GraalVM 22.2+\n" \
"Note that you need TruffleRuby+GraalVM and not just the TruffleRuby standalone to use MiniRacer"
end
@context = Polyglot::InnerContext.new(on_cancelled: -> {