[Ruby on Rails (RoR)] Use rvm install truffleruby of GraalVM high-performance Ruby implementation

TruffleRuby

TruffleRuby is the GraalVM high-performance implementation of the Ruby programming language.

GraalVM is a high-performance multilingual runtime. It is designed to accelerate the execution of applications written in Java and other JVM languages while also providing runtimes for JavaScript, Ruby, Python, and a number of other popular languages. GraalVM’s polyglot capabilities make it possible to mix multiple programming languages in a single application while eliminating any foreign language call costs.

Prerequisites

Installaction

Upgrade rvm to the latest version.

1
$ rvm get head

Install truffleruby.

1
$ rvm install truffleruby

Check truffleruby version.

1
2
$ ruby -v
truffleruby 21.0.0, like ruby 2.7.2, GraalVM CE Native [x86_64-darwin]

References

[1] Ruby Reference - https://www.graalvm.org/reference-manual/ruby/

[2] Using Ruby with GraalVM - https://www.graalvm.org/reference-manual/ruby/InstallingGraalVM/

[3] GraalVM - https://www.graalvm.org/