Is it impossible to use Guard with RubyMine?

前端 未结 5 1181
[愿得一人]
[愿得一人] 2021-01-29 21:07

For some inexplicable reason, RubyMine autosaves every change you make and so every key stroke will trigger Guard to run your tests! And the most ridiculous thing is that there

5条回答
  •  盖世英雄少女心
    2021-01-29 21:22

    This is a really frustrating problem, and makes it very hard to use RubyMine with guard or grunt or other task-runners.

    I created a bit of a crazy workaround, but it's working well enough for me:

    1. Add an External Tool to run the venerable Unix "touch" command, which updates the modified timestamp of a file, thereby generating a filesystem event. It should look like this: External Tool called touch
    2. Assign the External Tool a keyboard shortcut.
    3. Assign a keyboard shortcut to the Save Document command.
    4. Record a macro that runs Save Document, then the "touch" External Tool. You need to use the keyboard shortcuts you assigned because Save Document does not appear in the application's menus.
    5. Assign Cmd-S as a keyboard shortcut for your new macro.

    My full blog post about this is at http://singlebrook.com/blog/saving-files-in-rubymine

提交回复
热议问题