IntelliJ IDEA 2017.1 Help

Bundling Gems

This feature is supported in the Ultimate edition only.

In this section:

Basics

The procedure of bundling gems in IntelliJ IDEA depends on the bundler version you are working with.

In any case, the Bundler displays its output in Run tool window, and creates the necessary infrastructure under the vendor directory.

Managing gem dependencies with the Bundler version 0.9 or higher

To manage gem dependencies using the Bundler version 0.9 or higher, follow these steps:

  • On the main menu, point to Tools | Bundler - Install.
  • In the Bundle Install dialog box, specify the installation options if any, and click OK.

Note the following:

  • IntelliJ IDEA understands the gems bundled inside projects.

    If the path is specified in the Bundler - Install command

    --path vendor/bundle

    the output looks as follows:

    /help/img/idea/2017.1/bundler_install_in_project.png
  • IntelliJ IDEA adds the directory .bundle to the project root.

    This directory is automatically included in the project structure to make the gems parsed.

  • The directory vendor/bundle is excluded from the project scope to avoid searching inside the gems (unless you specifically ask for it).
    /help/img/idea/2017.1/ij_bundler_project_structure.png
  • The local gems are added to the node External Libraries:
    /help/img/idea/2017.1/rm_gems_in_project.png

Managing gem dependencies using the legacy Bundler versions

To manage gem dependencies using the legacy Bundler versions:

  • On the main menu, choose Tools | Bundler - Bundle Gems.

See Also

Web Resources:

Last modified: 18 July 2017