Search code examples
rubyrubymine

RubyMine ARGV Parameters


Does anyone know how to access the ARGV values in RubyMine?

I want to work within RubyMine...but can't seem to use ARGV when trying to build within RubyMine. The application works fine in Terminal on my Mac, but not in RubyMine.

This is what I am trying to run in RubyMine, and what I am getting back when built. (Down at the bottom)

enter image description here

This is what I am supposed to be getting back when built.

enter image description here

Where do I type the command line arguments in RubyMine?


Solution

  • In RubyMine, the arguments go into the Run/Debug configurations. You can get there from Run > Edit Configurations.

    You should see something that looks like this:

    enter image description here

    Be sure to hit Apply after you've filled in the values you want.

    Then when you run your script, you'll see the values passed into ARGV.