You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: `SYSTEM_RUBY` should be CRuby version 2.3 or higher.
48
+
47
49
```bash
48
50
jt --help
49
51
```
@@ -146,14 +148,25 @@ or use one of the `native*` build configuration (which also builds a native truf
146
148
147
149
## Running
148
150
149
-
`jt ruby` runs TruffleRuby. You can use it exactly as you'd run the MRI `ruby`
150
-
command. Additionally, `jt ruby` sets a couple of extra options to help you when
151
+
### Running Small Scripts
152
+
153
+
`jt ruby` runs TruffleRuby.
154
+
You can use it exactly as you'd run the MRI `ruby` command and this is useful to compare behavior.
155
+
Additionally, `jt ruby` sets a couple of extra options to help you when
151
156
developing, such as loading the core library from disk rather than the JAR.
152
157
`jt ruby` prints the real command it's running as it starts.
153
158
154
-
If you are running a Ruby environment manager like `rvm`, `rbenv`, or `chruby`
155
-
please run `rvm use system`, `rbenv system`, or `chruby system` to clear their
156
-
environment variables, so that the correct gems are picked up.
159
+
`jt ruby` does not add TruffleRuby to `PATH` and does not support installing gems
160
+
if `GEM_HOME` or `GEM_PATH` is set, see below for that.
161
+
162
+
### Running Ruby Programs Which Need Gems
163
+
164
+
The best here is to use a Ruby manager like `rbenv` or `chruby` for this.
165
+
`jt build` automatically registers any truffleruby build with `rbenv` or `chruby`.
166
+
So you can simply `chruby truffleruby-jvm` or `rbenv shell truffleruby-jvm` (adapt the name for a different build configuration).
167
+
And with that, the gem environment is properly setup and you can use TruffleRuby just like you would use CRuby, including using `gem`, `bundle`, `rake`, `ruby`, etc.
168
+
169
+
### Build Configurations
157
170
158
171
By default, `jt ruby` runs the `jvm` build of TruffleRuby (that is, built with the `--jvm`[build
159
172
configuration](#building) and using the default build name) and aborts if this build doesn't exist.
0 commit comments