How run script with rails runner in RubyMine?

In command line a can use

rails runner some_script.rb

and I run script in rails context and I can use model classes in this script.

How I can do this action in RubyMine?


The Stack Overflow link is for IDEA 14. Neither option looks to work in RubyMine.

The problem I am encountering with trying to configure rails runner, is that RubyMine seems to insist on adding ruby to the start of the command line. I end up with something like "ruby rails runner" instead of just "rails runner".

Any suggestions would be welcome. I would like to be able to use the RubyMine debugger instead of Pry bindings.



Gem command run configuration might help in this case, please take a look:


Please sign in to leave a comment.