Skip to content

Latest commit

 

History

History
136 lines (93 loc) · 3.9 KB

ruby-managers.md

File metadata and controls

136 lines (93 loc) · 3.9 KB
layout toc_group link_title permalink
docs-experimental
ruby
Ruby Managers and Installers
/reference-manual/ruby/RubyManagers/

Ruby Managers and Installers

TruffleRuby is supported by the 3 major Ruby installers.

rvm

Upgrade rvm to let rvm know about the latest TruffleRuby release:

rvm get head

Install the latest TruffleRuby Native Standalone release with:

rvm install truffleruby

You can also install the latest Native Standalone dev build of TruffleRuby with:

rvm install truffleruby-head

ruby-build and rbenv

We assume you already have ruby-build installed as a plugin for rbenv.

First, you need to upgrade ruby-build to get the latest TruffleRuby definition. See ruby-build's instructions for upgrading.

On macOS, if ruby-build is installed via Homebrew and you do not see the latest TruffleRuby release, you might need to install the HEAD version of ruby-build with:

brew reinstall --HEAD ruby-build

Check the latest available version of TruffleRuby with:

rbenv install --list

Then install the latest TruffleRuby Native Standalone release with:

rbenv install truffleruby-[LATEST_VERSION]

You can also install the latest Native Standalone dev build of TruffleRuby with:

rbenv install truffleruby-dev

You can also install the TruffleRuby JVM Standalone with:

rbenv install truffleruby+graalvm-[LATEST_VERSION] OR truffleruby+graalvm-dev

asdf (with asdf-ruby plugin)

See https://github.com/asdf-vm/asdf-ruby for installing and updating asdf-ruby.

You can install a TruffleRuby Native Standalone release or dev build with:

asdf install ruby truffleruby-VERSION OR truffleruby-dev

You can also install the TruffleRuby JVM Standalone with:

asdf install ruby truffleruby+graalvm-VERSION OR truffleruby+graalvm-dev

ruby-install and chruby

See https://github.com/postmodern/ruby-install#install for installing and updating ruby-install.

First, ensure you have the latest ruby-install release. Check your version with:

ruby-install --version

And compare to the latest tag. If it is older, you should update to the latest ruby-install (e.g. 0.8.4 is necessary for aarch64 support). Follow the installation instructions, since the steps for upgrading ruby-install are the same as the steps for installing it.

Then install the latest TruffleRuby Native Standalone release with:

ruby-install --update
ruby-install truffleruby

You can also install the TruffleRuby JVM Standalone with:

ruby-install truffleruby-graalvm

ruby-install does not support installing dev builds. Please use ruby-build (which also works with chruby) if you want to install dev builds:

ruby-build truffleruby-dev ~/.rubies/truffleruby-dev
OR
ruby-build truffleruby+graalvm-dev ~/.rubies/truffleruby+graalvm-dev

There are also instructions on the chruby wiki if you prefer to install TruffleRuby manually.

Using TruffleRuby without a Ruby Manager

If you are using a Ruby manager like rvm, rbenv, or chruby and wish not to add TruffleRuby to one of them, make sure that the manager does not set environment variables GEM_HOME and GEM_PATH. The variables are picked up by TruffleRuby (as any other Ruby implementation would do) causing TruffleRuby to pickup the wrong gem home instead of its own.

It can be fixed for the current terminal by clearing the environment with one of the following commands:

rbenv system
chruby system
rvm use system
# Or manually:
unset GEM_HOME GEM_PATH