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
Copy file name to clipboardExpand all lines: README.md
+24-1Lines changed: 24 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -65,7 +65,30 @@ Depending on the context, ruby-build does a little bit more than the above: for
65
65
66
66
#### Custom Build Definitions
67
67
68
-
To install a version of Ruby that is not recognized by ruby-build, you can specify the path to a custom build definition file in place of a Ruby version number.
68
+
To install a version of Ruby that is not available in ruby-build, you can specify the path to a custom build definition file in place of a Ruby version number.
69
+
70
+
```sh
71
+
# As a standalone program
72
+
$ ruby-build -d /path/to/3.4-custom /opt/rubies # installs to /opt/rubies/3.4-custom
73
+
74
+
# As an rbenv plugin
75
+
$ rbenv install /path/to/3.4-custom # installs to $(rbenv root)/versions/3.4-custom
76
+
```
77
+
78
+
You can also provide a _directory_ of custom build definition files.
79
+
The path(s) will be searched along with ruby-build's bundled `share/ruby-build/` directory.
80
+
(Perhaps a collection of 3rd-party build definitions published as a git repo,
81
+
or an organization's custom build definitions distributed in-house.)
82
+
83
+
```sh
84
+
# As a standalone program
85
+
$ RUBY_BUILD_DEFINITIONS=/path/to/custom/defs ruby-build --definitions # lists all available versions of Ruby, including custom defs
86
+
$ RUBY_BUILD_DEFINITIONS=/path/to/custom/defs ruby-build -d 3.5-custom /opt/rubies # installs to /opt/rubies/3.5-custom
87
+
88
+
# As an rbenv plugin
89
+
$ RUBY_BUILD_DEFINITIONS=/path/to/custom/defs rbenv install --list # lists all available versions of Ruby, including custom defs
90
+
$ RUBY_BUILD_DEFINITIONS=/path/to/custom/defs rbenv install 3.5-custom # installs to $(rbenv root)/versions/3.5-custom
91
+
```
69
92
70
93
Check out [default build definitions][definitions] as examples on how to write definition files.
0 commit comments