RubyMine 6.3.0 Web Help

RubyMine helps populate your Rails applications with the stubs of all the required elements, and provides two ways of launching the generators:

  • The standard Alt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+InsertCtrl+N or Alt+InsertAlt+InsertAlt+InsertCtrl+N or Ctrl+EnterCommand N or Control EnterControl N or Control EnterCommand N or Control EnterControl N or Control Enter functionality.
  • Tools | Run Rails Generator command on the main menu.
Thus RubyMine launches the generate script with the element name specified as a parameter, and a list of arguments. As a result, RubyMine produces the required application elements and places them to the proper locations of the directory structure.

To create a stub of a Rails application element
  1. Do one of the following:
    • On the main menu, choose Tools | Run Rails Generator.
    • Press Ctrl+Alt+GCtrl+Alt+GCtrl+Alt+GCtrl+Alt+GCtrl+Alt+GCtrl+Alt+GCtrl+Alt+GCtrl+Alt+GAlt+GAlt Command GAlt GAlt Command GAlt G.
    • With the editor, or the Project tool windows having the focus, press Alt+InsertAlt+InsertAlt+InsertAlt+InsertAlt+InsertCtrl+N or Alt+InsertAlt+InsertAlt+InsertCtrl+N or Ctrl+EnterCommand N or Control EnterControl N or Control EnterCommand N or Control EnterControl N or Control Enter, or choose New on the context menu of the Project tool window. Then choose Run Rails Generator.
  2. In the pop-up frame that opens, start typing the desired generator name, or its part. As you type, the suggestion list shrinks to show the matching entries only:

    ruby_railsGenerateMigration1.png

    Tip

    • If you want to see the complete list of all the available generators, type *.
    • If you cannot find the generator you need, reload generators. To do that, just choose [Reload generators list] from the pop-up menu.
  3. In the dialog box that opens, specify the name of the new application element, and a list of arguments.
    5.0+

    Besides that, choose the desired environment:

    ruby_choose_env
  4. If necessary, select the check boxes that correspond to the general options of the generate script.
  5. Click OK. RubyMine runs the generate script and displays output messages in the dedicated tab of the Run tool window:

    ruby_railsGenerateMigration2.png

See Also

Procedures:

Reference:

Web Resources: