RubyMine 2017.3 Help

File Watchers

File | Settings | Tools | File Watchers for Windows and Linux
RubyMine | Preferences | Tools | File Watchers for macOS
Ctrl+Alt+S settings

The page is available when the File Watchers plugin is enabled. The plugin is not bundled with RubyMine, but it can be installed from the JetBrains plugin repository as described in Installing, Updating and Uninstalling Repository Plugins and Enabling and Disabling Plugins.

RubyMine integrates with various third-party compilers that run in the background and translate Less, Sass, SCSS, and Stylus into CSS, or CoffeeScript into JavaScript, as well as compress JavaScript and CSS.

To use a compiler in RubyMine, you need to configure it as a File Watcher. For each supported compiler, RubyMine provides a predefined File Watcher template.

The output of a File Watcher is stored in a separate file. Each predefined template suggests the type of the output file depending on the compiler type. By default the output file is created in the same folder as the input file when the File Watcher is invoked for the first time, after that this file is only updated. However, in the Project tree view, the output file is shown under the original file which is shown as a node. This is done to improve visibility so you can easier locate necessary files.

File watchers have two dedicated code inspections:

  • The File watcher available inspection is runs in every file where a predefined File Watcher is applicable. If the project has no relevant File Watcher configured, RubyMine suggests to add one.
  • The File watcher problems inspection is invoked by a running File Watcher and highlights errors specific for it.

Use this page to create project File Watchers based on predefined RubyMine File Watcher templates. The page consists of two parts:

  • A list of File Watchers available in the current project. To activate a File Watcher, select the check box next to it. If an error occurs while a File Watcher is running, the File Watcher is automatically disabled.
  • A toolbar to manage this list.

Item Tooltip/
and shortcut
new.png Add
Click this button to open the Choose template pop-up list and choose the relevant type of File Watcher. After that RubyMine opens the New Watcher dialog box for customizing the predefined File Watcher according to the settings of the current project.
edit1 Edit
Click this button to update the settings of the selected File Watcher in the Edit Watcher dialog box. The update is applied to the current project File Watcher only, it does not affect the predefined RubyMine-level template.
delete Remove
Click this button to remove the selected File Watcher. The File Watcher is no longer applied to the files in the current project. Note that this action does not affect the corresponding predefined template which is still available at the RubyMine level.
arrowUp.png arrowDown.png Up(Ctrl+Alt+Up)
Down (Ctrl+Alt+Down)
Use these buttons to change the order of File Watcher in the list. This determines the order of launching File Watchers, if more than one are enabled.
copyCopyUse this button to create a copy of the selected file watcher.
icon importCopyrightProfileImportClick this button to import an existing file watcher and add it to the list of available file watchers.
exportToXMLExportClick this button to export the selected watchers to watchers.xml file, located under the user's home.
Last modified: 29 November 2017

See Also