RubyMine plugin: How to invoke a rake task for specified Rails-environment?


There was similar discussion about invoking rake-tasks using RubyMine API: and provided method was successfully used for a long time. But now I'd like to invoke a rake task for specific Rails environment (dev, test, prod) from RubyMine plugin (basically, set RAILS_ENV environment variable before running the task). I'm not sure it's possible to set env. variables in GemsRunner.runGemsExecutableScript, so could you please advise?

Thank you,

Comment actions Permalink

Hi Basil,

Unfortunately there doesn't seem to be a good API to do what you need. You're welcome to file a YouTrack issue (in the RUBY project) asking for one to be added.

Comment actions Permalink

Just an update for this ooold issue :) While I managed to find some workaround for env vars before, now I cannot find any so some env vars api is required. The ticket is here:

Related GitHub issue -

RubyMine team, could you please take a look and tell whether this can be implemented?

Thank you very much!


Please sign in to leave a comment.