WSL
RubyMine allows you to use the remote Ruby interpreter installed on Windows Subsystem for Linux (WSL and WSL 2) for your local projects. The following Linux distributions are supported:
If necessary, you can use custom Linux distributions run on WSL.
Configure WSL as a remote interpreter
Perform the following steps to configure an interpreter:
Open the Settings/Preferences dialog Ctrl+Alt+S, go to the Language & Frameworks | Ruby SDK and Gems page.
Click the and select New remote… in the drop-down:
In the invoked dialog, select WSL:
Choose the desired Linux distribution.
In Ruby or version manager path, specify the path to the Ruby interpreter or the version manager executable. Click OK.
(Optional) If you specified a path to the version manager executable in the previous dialog, RubyMine suggests selecting the Ruby interpreter used to run a remote application:
Select the added SDK in the Ruby SDK and Gems page:
(Optional) If you want to use the added SDK to debug a remote process, specify mappings between files of a local and remote project. To do this, click the Edit Path Mappings button. In the Edit Project Path Mappings dialog, specify the local and remote project root paths:
Custom WSL distributions
RubyMine allows you to use custom Linux distributions run on WSL. This can be done by editing the wsl.distributions.xml configuration file created by RubyMine automatically after detecting WSL.
Add a custom distribution
Open the %APPDATA%\JetBrains\<product><version>\config\options\wsl.distributions.xml file.
Add the
descriptor
element and provide settings to access your custom distribution. Note that theid
value should be unique. For example:<!-- ... --> <descriptor> <id>DEBIAN_CUSTOM</id> <microsoft-id>Debian</microsoft-id> <executable-path>debian-custom.exe</executable-path> <presentable-name>Debian GNU/Linux - Custom</presentable-name> </descriptor> <!-- ... -->You can specify
executable-path
in two ways:Specify the executable name of a custom distribution. In this case, RubyMine will find a custom distribution in %LOCALAPPDATA%\Microsoft\WindowsApps.
Specify the absolute path to the custom distribution executable.
Restart RubyMine and add your custom distribution as a remote interpreter as described above.