-
Notifications
You must be signed in to change notification settings - Fork 255
The ridk tool
ridk
is a helper tool to manage the runtime environment of RubyInstaller-2.4 and up.
It can be used in cmd and powershell.
See ridk help
for available sub-commands:
Usage:
C:/Ruby24-x64/bin/ridk.cmd [option]
Option:
install Install MSYS2 and MINGW dev tools
exec <command> Execute a command within MSYS2 context
enable Set environment variables for MSYS2
disable Unset environment variables for MSYS2
version Print RubyInstaller and MSYS2 versions
use Switch to a different ruby version
help | --help | -? | /? Display this help and exit
See the following answer on Stackoverflow.
This sets a bunch of environment variables required to execute MSYS2 commands.
It makes sh
, make
, gcc
, etc. available to the running console.
Execute the given <command>
with MSYS2 environment variables set properly.
ridk exec pacman -Ss hello-world
Please note, that a maximum of 9 parameters is accepted only. That is due to restrictions of the cmd shell.
This prints a series of ruby related version information to the console. Please use this output to submit issues.
This sub-command can be used to switch the active ruby version within the running command shell.
The interactive mode can be started on a console window with ridk use
.
By default it scans the Windows registry for RubyInstaller versions and let's you choose a version to change to.
All RubyInstaller versions down to 1.8.7 are supported.
Alternatively to scanning the registry a config file with ruby paths can be used.
It can be created per ridk use update
and is populated with all ruby versions that have been found in the registry.
The config file is subsequently used and replaces the registry scan.
If a new ruby version has been installed, the config file can be updated ridk use update
, so that the new ruby becomes selectable.
It is also possible to select per regular expression.
With standard RubyInstaller paths ridk use /25-/
selects the x64 version ruby-2.5 while ridk use /25$/
selects the corresponding x86 version.
ridk use
always keeps itself in the PATH
, so that it is possible to keep using it, even if the selected ruby version doesn't provide ridk use