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:
Option | Description |
---|---|
<RubyMine> | The platform-specific RubyMine launcher. On macOS and Linux, it is recommended to use the command-line launcher created during the RubyMine installation, or create one manually by selecting on the RubyMine main menu. Refer to Besides working from within RubyMine, you can perform the following actions from the command line: for details. On Windows, it is recommended to add the path to the RubyMine executable to the |
path | The path to the file or the folder to be opened.
|
--line <number> | (optional) The line number, on which the caret should rest after opening the file. |
Examples
- Syntax
-
rubymine.exe --line <number> path
- Alternative syntax
-
rubymine.exe path:<number>
- Examples
-
rubymine.exe --line 3 C:\MyProject\scripts\numbers.js rubymine.exe C:\MyProject\scripts\numbers.js:3
- Syntax
-
rubymine --line <number> path
- Alternative syntax
-
rubymine path:<number>
- Example
-
rubymine --line 3 ~/MyProject/scripts/numbers.js rubymine ~/MyProject/scripts/numbers.js:3