Basics

IntelliJ IDEA makes it possible to attach a JRuby facet to a Java module. This can be required for working with Ruby code, having resolve and code completion.

Suppose, you've created a project that contains a Java module, and you want to attach a facet to it. You must install JRuby on your computer.

By the way, if you create a module of, say, Ruby type, you may attach any available Ruby SDK.

Adding a JRuby facet

Having installed JRuby (for example, rvm install jruby), follow these steps:

  1. Open the Project Structure Dialog dialog.
  2. In this dialog, select the Facets page.
  3. Click ../../Shared/add.png:

    ../../Shared/ij_facet_detection_enabled.png

  4. From the pop-up menu of the possible facets that appears, choose JRuby facet:

    ../../Shared/ij_facet_jruby.png

  5. If JRuby has been installed previously, IntelliJ IDEA recognizes it and suggests to choose a Java module to which the facet should be added:

    ../../Shared/ij_facet_jruby_added_to_module.png

    Select the desired module.

    After that, JRuby facet appears under the module name:

    ../../Shared/ij_facet_jruby_added_to_module1.png

Deleting a JRuby facet

To delete a JRuby facet, follow these steps:

  1. Open the Project Structure Dialog dialog.
  2. In this dialog, select the Facets page.
  3. Click ../../Shared/delete.png.

See Also

Concepts:

External Links: