RubyMine 2022.3 Help

Open files from the command line

Open an arbitrary file or folder in RubyMine from the command line, optionally specifying where to put the caret after opening.

You can find the executable for running RubyMine in the installation directory under bin. To use this executable as the command-line launcher, add it to your system PATH as described in Command-line interface.

Syntax
rubymine64.exe [--line <number>] [--column <number>] <path ...>
Examples

Open a project:

rubymine64.exe C:\MyProject

Open a specific file on line number 42:

rubymine64.exe --line 42 C:\MyProject\scripts\numbers.js

By default, RubyMine does not provide a command-line launcher. For information about creating a launcher script for RubyMine, see Command-line interface.

Syntax
rubymine --line <number> <path>
Examples

Open a project:

rubymine ~/MyProject

Open a specific file on line number 42:

rubymine --line 42 ~/MyProject/scripts/numbers.js

You can find the script for running RubyMine in the installation directory under bin. To use this script as the command-line launcher, add it to your system PATH as described in Command-line interface.

Syntax
rubymine.sh --line <number> <path>
Examples

Open a project:

rubymine.sh ~/MyProject

Open a specific file on line number 42:

rubymine.sh --line 42 ~/MyProject/scripts/numbers.js

When you specify the path to a file, RubyMine opens it in the LightEdit mode, unless it belongs to a project that is already open or there is special logic to automatically open or create a project (for example, in case of Maven or Gradle files). If you specify a directory with an existing project, RubyMine opens this project. If you open a directory that is not a part of a project, RubyMine adds the .idea directory to it, making it a project.

Last modified: 20 May 2022