layout | toc_group | link_title | permalink |
---|---|---|---|
docs-experimental |
ruby |
Installing TruffleRuby |
/reference-manual/ruby/InstallingTruffleRuby/ |
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.
TruffleRuby's dependencies need to be installed for TruffleRuby to run correctly.
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.
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.
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
.
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
.
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.
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.