Running Rails tasks with Run Anything

Andrey Aksenov

Hi there!

As you may already know, RubyMine provides a unified way to run Ruby scripts, Rails applications, Rake tasks, Rails generators, and so on with the powerful Run Anything (double Ctrl). At the same time, you can run Rails generators and Rake tasks using dedicated popups. For example, you can run the desired Rake task by pressing ⌥R / Ctrl+Alt+R and then finding the required action:
Rake tasks popup

This is similar too for Rails generators ⌥⌘G / Ctrl+Alt+G:
Rails generators popup

Starting with v2019.3, we have decided to replace the older popups with Run Anything and provide a single point of entry for running tasks/generators. So now, pressing ⌥R / Ctrl+Alt+R invokes the Run Anything popup and adds the rake command automatically. As you can see in the image below, you can reload and run Rake tasks.

Run rake task using Run Anything

When invoking Rails generators (⌥⌘G / Ctrl+Alt+G), RubyMine inserts the rails g command part.
Run Rails generator using Run Anything

The Run Anything popup also shows command descriptions to help you quickly understand what each command does. You can learn more about which commands you can run using Run Anything from our Running Anything help page.
Try out the new approach and let us know about any issues you come across in the comments. Please also feel free to submit any issues or feature suggestions to our YouTrack issue tracker. Thank you!

Download RubyMine 2019.3 EAP

Your RubyMine Team

Comments below can no longer be edited.

2 Responses to Running Rails tasks with Run Anything

  1. James says:

    January 16, 2020

    When running a task, such as db:migrate you were previously given a second popup with the option to select the environment (test/dev/prod).

    The new Run Anything window doesn’t give any such option. Now I have to type `RAILS_ENV=…` manually when running the task?

    • Olga Kuvardina says:

      January 17, 2020

      Hello, James! Which RubyMine version are you using and does it happen to all your projects or only a certain one? I’ve checked in RM 2019.3.2 Preview but didn’t manage to reproduce the problem there.


Subscribe for updates