After Ruby 3.2.0 build fails was resolved we can use Ruby 3.2, but it is currently not compiled with YJIT:
$ ruby -v --yjit ruby: warning: Ruby was built without YJIT support. You may need to install rustc to build Ruby with YJIT. ruby 3.2.0 (2022-12-25 revision a528908271) [x86_64-linux]
YJIT in Ruby 3.2 provides significant speedups (20-40%) for Rails and other Ruby applications. Rust 1.58+ is required per ruby/building_ruby.md at v3_2_0 · ruby/ruby · GitHub. FWIW, on my Mac installing Rust with Homebrew was enough for
ruby-install 3.2.0 to pick it up automatically.
After Ruby is built with YJIT one still needs to activate it either via command line option (
ruby --yjit) or environment variable (
RUBY_YJIT_ENABLE=1 ruby). I believe this opt-in makes it safe for Render to distribute a YJIT-enabled Ruby 3.2 in the Ruby language Native Environment, and we’d love to take advantage of it