RubyMine 2019.3 Help

Opening Files from Command Line

You can open an arbitrary file, folder, or project for editing in RubyMine from the command line, optionally specifying where the caret should rest after opening the file.

  • In the command line, run the following command:

    <RubyMine> [--line <number>] path

    Alternatively, you can use the following syntax:

    <RubyMine> path:<number>

The command options are as follows:




The platform-specific RubyMine.

On macOS and Linux, it is recommended to use the command-line launcher created during the RubyMine installation, or create one manually by selecting Tools | Create Command-line Launcher on the RubyMine main menu. Refer to Enable a command-line launcher on macOS/Linux for details.

On Windows, it is recommended to add the path to the RubyMine executable to the Path environment variable.


The path to the file or the folder to be opened.

  • If the file or folder belongs to an existing project, this project will be opened.

  • If the file does not belong to any project, a temporary project for this file will be created automatically.

  • If the folder does not belong to any project, a new project will be created inside this folder.

--line <number>

(optional) The line number on which the caret should rest after opening the file.


rubymine.exe --line <number> path
Alternative syntax
rubymine.exe path:<number>
rubymine.exe --line 3 C:\MyProject\scripts\numbers.js rubymine.exe C:\MyProject\scripts\numbers.js:3
mine --line <number> path
Alternative syntax
mine path:<number>
pycharm path:<number>
mine --line 3 ~/MyProject/scripts/numbers.js mine ~/MyProject/scripts/numbers.js:3
Last modified: 30 January 2020