Skip to content

Commit

Permalink
Mention all the requirements for MiniRacer on TruffleRuby (#257)
Browse files Browse the repository at this point in the history
Raise there instead of waiting for the `@context.eval` below, for a clearer error.
  • Loading branch information
eregon committed Aug 17, 2022
1 parent 9935d5a commit 719abdb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/mini_racer/truffleruby.rb
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ def init_unsafe(isolate, snapshot)
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: -> {
Expand Down

0 comments on commit 719abdb

Please sign in to comment.