RubyMine 2022.1 Help

Getting started with remote development

You can connect to a remote server using the SSH connection to develop, run and deploy your project.


Before you start developing on the remote machine, make sure you have the following:

  • You have met the minimum recommended requirements that can be found here.

  • You have installed a compatible SSH server on the Linux platform.

  • The Linux platform has any recent Linux AMD64 distribution such as Ubuntu 16.04+, RHEL/Centos 7+, and so on. There is no arm64 support yet. We recommend that you use machines with 2+ cores, 4GB+ of RAM, and 5GB+ of disk space.

  • You need to have the sftp subsystem enabled on the remote host. In the current implementation, we use it for the backend deployment.

JetBrains Gateway

JetBrains Gateway is a lightweight launcher that connects a remote server with your local machine, downloads necessary components on the backend, and opens your project in JetBrains Client.

You can use JetBrains Gateway as a standalone launcher or as an entry point from your IDE to connect to a remote server.

Launch JetBrains Gateway and connect to a remote server

  1. Download and install the JetBrains Gateway app.

    Alternatively, you can access JetBrains Gateway from the welcome screen of your IDE through the Remote Development option.

  2. In the Remote Development wizard, click Connect via SSH.

    Connect via SSH
  3. On the next page of the wizard, specify the SSH configuration through which you want to connect to a remote server.

    Connect via SSH

    Alternatively, click SSH configurations to open the SSH Configurations dialog and configure the SSH settings.

    In the SSH Configurations dialog, add the following information:

    SSH configurations
    • Host: specify the address of your remote server.

    • Port: specify the SSH port, which defaults to 22.

    • Local port: specify the outgoing port.

      For example, TCP> (ESTABLISHED).

    • User name: specify the name of a user on a remote server.

    • Authentication type: select one of the following authentication methods:

      • Password: to access the host with a password. To save the password in RubyMine, select the Save password checkbox.

      • Key pair (OpenSSH or PuTTY): to use SSH authentication with a key pair. To apply this authentication method, you must have a private key on the client machine and a public key on the remote server. RubyMine supports private keys that are generated with the OpenSSH utility.

        Specify the path to the file where your private key is stored and type the passphrase (if any) in the corresponding fields. To have RubyMine remember the passphrase, select the Save passphrase checkbox.

      • Parse config file ~/.ssh/config: select this option if you want JetBrains Gateway to use the .ssh/config file.

    • Test Connection: click this button to see whether the connection is established.

    • Connection Parameters: use this section to configure additional parameters for the connection.

    • HTTP/SOCKS Proxy: use this section to configure proxy settings. For more information, refer to Proxy settings.

    Click OK to save the changes and return to the Welcome to JetBrains Gateway dialog.

    Click Check Connection and Continue to check whether the connection is established.

  4. On the next page, specify the RubyMine version to download to the remote server. JetBrains Gateway displays a list of the IDEs versions that are available for downloading and the already installed ones. The versions on JetBrains Client and the remote host must be the same.

    the IDE version

    By default, the downloaded RubyMine is located in the following folder on the remote server: ~/.cache/JetBrains/RemoteDev/dist. However, you can change it and install RubyMine into a custom location with the following steps:

    • Click Other options and select the Customize install path option.

    • In the Install path field add the needed location for the installation.

    Install to custom location

    Add the path to your project on the remote host.

    Path to remote project

    Click Download and Start IDE.

    JetBrains Gateway downloads the IDE, and opens your remote project in JetBrains Client. The connection is shown in the JetBrains Gateway window, from which you can connect to other IDEs or disable the connection. This window is hidden to tray by default.

Open recent projects

  1. In the JetBrains Gateway wizard, select SSH from the options on the left.

  2. In the search field enter the name of your project to quickly navigate to it.

    Recent projects

    If you need to quickly access the terminal, click Open terminal.

Stop the running instance

  1. In the JetBrains Gateway wizard, select SSH from the options on the left.

  2. When your remote session is active, the Running indicator is displayed next to the project.

    Click Platform impl actions more next to the project and select Stop Instance to stop the remote session for that project.

    You can also select Remove from Recent Projects to remove the project listed on the page altogether.

Connect to a remote project from the IDE installed on the remote server

If you have RubyMine installed on your remote server, you can quickly connect to your remote project from that IDE. It works the same as from JetBrains Gateway.

Connect from the local IDE

  1. Make sure you have downloaded and installed JetBrains Gateway on your local machine.

  2. Make sure you have an SSH connection and the RubyMine IDE on the remote host.

  3. In the terminal of the remote server, run the following command: run <path/to/project> --ssh-link-host <host>

    For example, ~/RM-213.5744.3/bin/ run ~/RubymineProjects/SampleApp/ --ssh-link-host

    The script, along with the downloaded IDE and the IDE logs are located in the bin directory on the remote server. To locate it, you can run the following command:

    find ~ -iname ''

    which will output the path to the script:

  4. As an output, you should receive the following link:

    Http link: https://code-with-me...

  5. Copy the generated link and paste it into your local browser.

  6. In the dialog that opens, click Open JetBrains Gateway.

    Open JetBrains Gateway dialog

    The JetBrains Gateway welcome screen opens.

  7. In the Connect to Remote Host with a Link section, enter the same generated link to start a remote session.

  8. Click Connect. RubyMine opens the remote project in JetBrains Client.

Install plugins

You can install plugins that you need on the remote server. Note that plugins are installed per project. Each time you create a remote connection for a new project, you need to install the desired plugin.

Based on the scenario that you use for downloading RubyMine on the remote server, you either install the plugin via the command line or use the UI of a remote project for your installation.

Install a plugin via the command line

If you manually configure RubyMine on the remote server, use the following steps to add plugins:

  1. From the JetBrains Marketplace page, find a page of the required plugin, select the Versions tab, and click any version to copy pluginId (short name such as NodeJS) of the plugin you want to install.

  2. Open the remote server go to the RubyMine instance where your project resides, and for which you want to download and install a third-party plugin.

    By default, the downloaded RubyMine instances are located in the following directory:

  3. Add the following command:

    bin/ installPlugins PROJECT_PATH pluginId

    (where PROJECT_PATH is a path to your remote project and pluginId is an ID you got from the JetBrains Marketplace page.)

    After the installation, unpack the downloaded plugin's archive.

    By default, the installed plugin is placed into the following folder on the backend:

  4. Continue with launching JetBrains Gateway and opening the remote project with the remotely installed plugin.

Install a plugin via UI

If you use JetBrains Gateway to download RubyMine to a remote server, use the following steps to install plugins.

  1. Open a remote project in JetBrains Client.

  2. Press Ctrl+Alt+S to open the IDE settings and select Plugins On Host.

  3. Download the needed plugin the same way as you would in a regular RubyMine project.

    The Plugins settings dialog

    For more information on regular plugin installation, refer to Install plugins.

  4. After you download and enable the plugin, click OK to save the changes.

    The plugin is installed remotely. However, keep in mind that the plugin is installed per project.

Work inside the remote project

A remote project gets opened in JetBrains Client as it would be opened in your local RubyMine IDE. You can develop it like any other local project: edit code, run applications, debug, and deploy.

Remote project

If you want to find more about the Remote Development processes and architecture in general, refer to Remote development overview.

Add VM options

You can adjust VM options for the remote project, especially if you want to increase the -Xmx memory size when working with a larger project. You need to perform those actions and save your changes on the remote server.

  1. From the main menu, select Help | Edit Custom VM Options (On Host).

  2. Edit the rubymine64.vmoptions file.

    For example, change the -Xmx2048 option to -Xmx3072.

    For more detailed information on VM options, refer to Advanced configuration.

  3. Restart your IDE on the remote server to see the changes.

Close the Remote Development session

  • Click the Close button to close the remote session window.

    You are returned to the JetBrains Gateway welcome screen where you can use the Recent SSH projects page to reconnect to your remote session or stop the running instance.

Create multiple connections

You can create multiple connections to the same remote host and the same version of the IDE. You can also have connections with different IDE versions and remote hosts.

  1. Connect and open a remote session.

  2. Since JetBrains Gateway is constantly active once you have connected to the remote server, you can click its icon to open the JetBrains Gateway welcome screen and configure other connections.

    If you connect to the same IDE version, then JetBrains Client will be opened as an instance of the same process. If you connect to a different remote host or IDE version, a different remote session will be launched.

Backend control center

When you work with your remote project, you can check the status of the remote server. That means you can check the CPU load, disk, and memory consumption on your backend. You can also add heap size and restart the remote backend right from JetBrains Client.

After opening your remote project, the name of your backend, memory and latency indicators are displayed on the main toolbar.

main toolbar

Work with the control center window

  1. In JetBrains Client, on the main toolbar, click the name of the remote server to open the Connection Details window.

    Connection Details
  2. On the Performance tab, check the status of CPU load, memory consumptions, and the disk space.

    • Ping: this is a time indicator that shows how much time it takes to transfer data between JetBrains Client and the remote server using RD protocol.

    • CPU Load: this is an indicator of how many processes are executed by CPU.

    • Memory (RAM): this is an indicator that shows the RAM state of the remote server. If the memory limit is reached, you need to access your remote server and increase RAM or terminate processes that consume it.

    • Disk: this is an indicator of how much disk space is used by the remote server.

  3. Click the Output tab to see the last 2500 symbols of the log file from the remote server.

    This information helps you to see the end of log file and potential errors or issues that might have occurred.

    the Output tab
  4. If you want to increase the heap memory size, click the Settings tab and in the Maximum heap size field, add the needed amount of memory and click Save and Restart to apply the changes. Alternatively, you can click Save if you don't want to restart the backend immediately.

    the Settings tab

If you encounter a problem working in JetBrains Client, you can open a main tool window of the backend IDE and try to fix your problem there.

Access the backend IDE UI

  1. In JetBrains Client, on the main toolbar, click the name of the remote server to open the Connection Details window.

  2. In Connection Details window, click More options and select Show Main Window.

    Show main tool window

    The main window of the backend IDE gets projected. Now you can use it to access remote settings and configure various remote options if you couldn't do that in JetBrains Client.

SSH forwarding settings

The SSH forwarding settings let you use SSH key forwarding to authenticate access to Git repositories from your remote server. Alternatively, you can use the SSH-agent helper to achieve the same result.

Access SSH forwarding settings

  1. Press Ctrl+Alt+S to open the IDE settings and select Tools | SSH Forwarding.

  2. From the options on the right, select Enable SSH agent Forwarding and click OK to save the changes.

    SSH Agent Forwarding
Last modified: 10 May 2022