First, make sure you have at least ruby version 2.6
, then enable it with a flag:
ruby --jit ./my-ruby-script.rb
Or with an environment vairable:
RUBYOPT="--jit"
If you want to see JIT output in your console do:
RUBYOPT="--jit --jit-verbose=1"
And that’s it, now let it do it’s thing!