Skip to content

Commit c95144a

Browse files
committed
[GR-18163] Document how to install truffleruby with asdf (#2600)
PullRequest: truffleruby/3355
2 parents 154da14 + 74e972c commit c95144a

File tree

2 files changed

+33
-14
lines changed

2 files changed

+33
-14
lines changed

README.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,23 @@ TruffleRuby comes in two distributions:
1313

1414
You can install either of those:
1515

16-
* Via your [Ruby manager/installer](doc/user/ruby-managers.md) (RVM, rbenv, chruby, ruby-build, ruby-install).
17-
We recommend trying TruffleRuby dev builds which contain the latest fixes and improvements.
16+
* Via your [Ruby manager/installer](doc/user/ruby-managers.md) (RVM, rbenv, chruby, asdf, ruby-build, ruby-install).
17+
We recommend trying TruffleRuby dev builds which contain the latest fixes and improvements (replace `VERSION` by `dev`).
1818

1919
Standalone:
2020
```bash
2121
RVM: $ rvm install truffleruby
22-
rbenv: $ rbenv install truffleruby-VERSION OR truffleruby-dev
22+
rbenv: $ rbenv install truffleruby-VERSION
23+
asdf: $ asdf install ruby truffleruby-VERSION
2324
chruby: $ ruby-install truffleruby
24-
$ ruby-build truffleruby-dev ~/.rubies/truffleruby-dev
25+
$ ruby-build truffleruby-VERSION ~/.rubies/truffleruby-VERSION
2526
```
2627
GraalVM:
2728
```bash
28-
rbenv: $ rbenv install truffleruby+graalvm-VERSION OR truffleruby+graalvm-dev
29+
rbenv: $ rbenv install truffleruby+graalvm-VERSION
30+
asdf: $ asdf install ruby truffleruby+graalvm-VERSION
2931
chruby: $ ruby-install truffleruby-graalvm
30-
$ ruby-build truffleruby+graalvm-dev ~/.rubies/truffleruby+graalvm-dev
32+
$ ruby-build truffleruby+graalvm-VERSION ~/.rubies/truffleruby+graalvm-VERSION
3133
```
3234

3335
* In CI with GitHub Actions, see [Testing TruffleRuby in CI](doc/user/standalone-distribution.md) for more details and other CIs.

doc/user/ruby-managers.md

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,13 @@ If you have [installed GraalVM](installing-graalvm.md), it is recommended to add
1010
See
1111
[Configuring Ruby managers for the full GraalVM distribution](#configuring-ruby-managers-for-the-full-graalvm-distribution) below.
1212

13-
## Installing TruffleRuby with RVM, `ruby-build`, or `ruby-install`
13+
## Installing TruffleRuby with `rvm`, `ruby-build`, `asdf` or `ruby-install`
1414

1515
TruffleRuby is supported by the 3 major Ruby installers.
1616

17-
### RVM
17+
### `rvm`
1818

19-
Upgrade RVM to let RVM know about the latest TruffleRuby release:
19+
Upgrade `rvm` to let `rvm` know about the latest TruffleRuby release:
2020

2121
```bash
2222
rvm get head
@@ -50,7 +50,7 @@ brew reinstall --HEAD ruby-build
5050
Check the latest available version of TruffleRuby with:
5151

5252
```bash
53-
rbenv install --list | grep truffleruby
53+
rbenv install --list
5454
```
5555

5656
Then install the latest TruffleRuby standalone release with:
@@ -71,6 +71,22 @@ You can also install TruffleRuby+GraalVM with:
7171
rbenv install truffleruby+graalvm-[LATEST_VERSION] OR truffleruby+graalvm-dev
7272
```
7373

74+
### `asdf` (with `asdf-ruby` plugin)
75+
76+
See https://github.com/asdf-vm/asdf-ruby for installing and updating `asdf-ruby`.
77+
78+
You can install a TruffleRuby standalone release or nightly build with:
79+
80+
```bash
81+
asdf install ruby truffleruby-VERSION OR truffleruby-dev
82+
```
83+
84+
You can install TruffleRuby+GraalVM with:
85+
86+
```bash
87+
asdf install ruby truffleruby+graalvm-VERSION OR truffleruby+graalvm-dev
88+
```
89+
7490
### `ruby-install` and `chruby`
7591

7692
First, you need at least `ruby-install` 0.7.1 to get TruffleRuby support.
@@ -146,19 +162,20 @@ chruby truffleruby
146162
ruby --version
147163
```
148164

149-
### RVM
165+
### `rvm`
150166

151-
RVM has a command for adding a precompiled Ruby to the list of available rubies:
167+
`rvm` has a command for adding a precompiled Ruby to the list of available rubies:
152168

153169
```bash
154170
rvm mount "$ruby_home" -n truffleruby
155171
rvm use ext-truffleruby
156172
ruby --version
157173
```
158174

159-
### asdf (with asdf-ruby plugin)
175+
### `asdf` (with `asdf-ruby` plugin)
160176

161-
Adding Truffleruby to asdf functions, much like `rbenv` or `chruby`, creates a symbolic link in the `.installs/ruby` directory but you also need to reshim:
177+
To add TruffleRuby to `asdf`, create a symbolic link in the `.installs/ruby` directory.
178+
You also need to reshim:
162179

163180
```bash
164181
ln -s "$ruby_home" "$HOME/.asdf/installs/ruby/truffleruby"

0 commit comments

Comments
 (0)