Configuring Remote Interpreters via Docker Compose
Before you start working with Docker Compose, make sure that the Docker Integration plugin is enabled. The plugin is bundled with RubyMine and is activated by default. If the plugin is not activated, enable it on the Plugins page of the Settings / Preferences Dialog as described in Enabling and Disabling Plugins.
As of this writing, Docker Integration in RubyMine is supported on macOS and Linux only.
Using Docker Compose to configure a remote interpreter
To configure a remote Ruby interpreter, follow these steps:
- In the Ruby SDK and Gems page of the Settings/Preferences dialog box, click .
- From the drop-down list, choose .
- In this dialog box that opens, do the following:
- Click the radio button Docker Compose.
- Choose the desired server from the drop-down list, or click New.
- In the Configuration file(s) field, specify the required configuration files, by clicking .
Use the toolbar , , , to make up the list of coonfiguration files.
Note that if the path points to a specific file (for example,
docker-compose.yml), then this configuration will be used. If the path points to a directory, then the configuration is defined by the file
docker-compose.ymland (if exists)
- In the field Environment variables, specify the environment variables of the container. Click the browse button next to this field, and specify the required environment variables using the toolbar buttons , , , .
- Choose the service that represent your project.
- The Ruby interpreter path field displays the path to the desired Ruby executable. You can accept default, or specify a different one.
- Click OK in the Configure Remote Ruby Interpreter dialog box. The configured remote interpreter is added to the list.
From this point, autocompletion, code inspections, as well as other features, will be driven by the interpreter from the Docker container derived from the service description in
Debugging an application with Docker Compose
If you want to debug your application in Docker Compose container, please make sure that the following prerequisites are met:
- The gems, required to make the RubyMine debugger work, are added to the
Gemfileof your project:
gem 'debase', '0.2.2.beta8' gem 'ruby-debug-ide'
- The command
docker-compose build, required to install these gems to your project, has been run in the Terminal.