- GraalVM for JDK 23 (Latest)
- GraalVM for JDK 24 (Early Access)
- GraalVM for JDK 21
- GraalVM for JDK 17
- Archives
- Dev Build
- Ruby Reference
- Compatibility
- Debugging Ruby
- Runtime Configurations
- Using Ruby with GraalVM
- Installing `libssl`
- Installing LibYAML
- Installing Make and GCC
- Installing `zlib`
- Migration from JRuby to Ruby
- TruffleRuby Options and Command Line
- Polyglot Programming
- Ruby Managers and Installers
- Standalone Distribution
- Development Tools for Ruby
- Ruby Additional Functionality
- Setting up a UTF-8 Locale
- Reporting Performance Problems
- Security
- Optcarrot Example
- FAQ
Installing TruffleRuby
The recommended way to install TruffleRuby is via your Ruby manager/installer, see Getting Started.
You can also install TruffleRuby by manually downloading the binary tarball, extracting it, running the post-install script and adding TruffleRuby to $PATH
.
This page documents the URLs and the extra steps necessary after downloading the tarball.
Dependencies #
TruffleRuby’s dependencies need to be installed for TruffleRuby to run correctly.
Oracle GraalVM and GraalVM Community Edition #
There are 2 variants of TruffleRuby and GraalVM:
- Oracle GraalVM, which provides the best TruffleRuby experience: it is significantly faster and more memory-efficient.
- GraalVM Community Edition, which is fully open-source.
Oracle GraalVM is the GraalVM distribution from Oracle available under the GraalVM Free Terms and Conditions.
Advantages of TruffleRuby on Oracle GraalVM #
Oracle GraalVM includes all features of GraalVM Community Edition and provides advanced features such as:
- Additional Graal JIT compiler optimizations, including better inlining and extra compiler passes;
- Additional Native Image features, including the G1 garbage collector, compressed pointers, profile-guided optimization, and Software Bill of Materials;
- Additional Truffle features, including sandboxing, polyglot isolates, resource limits, Auxiliary Engine Caching, and a faster implementation of the Truffle Object Model.
Thanks to these additional features, TruffleRuby runs faster and more memory efficient on Oracle GraalVM compared with GraalVM Community Edition.
Download Links #
Native Standalone #
Releases of the Native Standalone are available on GitHub. The Native Standalones are the files:
# Oracle GraalVM Native Standalone
truffleruby-VERSION-PLATFORM.tar.gz
# GraalVM Community Edition Native Standalone
truffleruby-community-VERSION-PLATFORM.tar.gz
Development builds are also available.
More platforms for dev builds are available here but those builds tend to be slightly older.
The Native Standalones are the files truffleruby-community-dev-PLATFORM.tar.gz
.
JVM Standalone #
Releases of the Native Standalone are available on GitHub. The JVM Standalones are the files:
# Oracle GraalVM JVM Standalone
truffleruby-jvm-VERSION-PLATFORM.tar.gz
# GraalVM Community Edition JVM Standalone
truffleruby-community-jvm-VERSION-PLATFORM.tar.gz
Development builds are also available.
The JVM Standalones are the files truffleruby-community-jvm-dev-PLATFORM.tar.gz
.
After Downloading #
Once you have downloaded a tarball, extract it.
We will refer to the directory you extracted it as $EXTRACTED_DIRECTORY
.
This directory should contain bin/truffleruby
, lib/truffle
, etc.
Then you need to run the post-install script.
This is necessary to make the Ruby openssl
C extension work with your system libssl.
The path of the script will be:
$EXTRACTED_DIRECTORY/lib/truffle/post_install_hook.sh
You can then add $EXTRACTED_DIRECTORY/bin
to PATH
and use ruby
/gem
/bundle
/etc.
RubyGems Configuration #
Note that you also need to ensure GEM_HOME
and GEM_PATH
are not set, so TruffleRuby uses the correct GEM_HOME
and GEM_PATH
.
See Using TruffleRuby without a Ruby manager for details.