# Bundler

> For the complete documentation index, see [llms.txt](https://www.jetbrains.com/help/ruby/2026.3/llms.txt).

> **TL;DR**
> Interact with Bundler from the main menu: `Tools | Bundler`

RubyMine supports integration with [Bundler](https://bundler.io) and enables you to handle gem dependencies for your application right inside the IDE.

## Install Bundler

As a rule, the [installed Ruby interpreter](set-up-a-ruby-development-environment.html) comes with Bundler installed. If not, you can install Bundler to the [project interpreter](configuring-language-interpreter.html) in one of the following ways:

Procedure:

* Select `Tools | Bundler | Install Bundler` from the main menu.

* Press `Ctrl` (Windows), `Ctrl` (macOS), `Ctrl` (IntelliJ IDEA Classic (macOS)), `Ctrl` (macOS System Shortcuts), `Ctrl` (XWin), `Ctrl` (GNOME), `Ctrl` (KDE), `Ctrl` (Emacs), `Ctrl` (Sublime Text), `Ctrl` (Sublime Text (macOS)), `Ctrl` (Visual Studio), `Ctrl` (Visual Studio (macOS)), `Ctrl` (TextMate), `Ctrl` (NetBeans), `Ctrl` (Eclipse), `Ctrl` (Eclipse (macOS)) twice and execute the `gem install bundler` command in the invoked popup.

* Open the RubyMine [terminal emulator](terminal-emulator.html) and execute the `gem install bundler` command.

> **Tip:**
> You can also install the Bundler gem [along with other gems](#install_gems_local) from the `Gemfile`.

## Bundle init

Procedure:

After installing Bundler, you can generate a `Gemfile` for the current project:

* Select `Tools | Bundler | Init` from the main menu.

> **Tip:**
> [Creating a new Rails application](get-started.html) initializes Bundler automatically since Rails has support for Bundler.

## Install gems

You can install gems defined in the `Gemfile` to the project interpreter as follows:

Procedure:

1. Do one of the following:

* Press `Ctrl` (Windows), `Ctrl` (macOS), `Ctrl` (IntelliJ IDEA Classic (macOS)), `Ctrl` (macOS System Shortcuts), `Ctrl` (XWin), `Ctrl` (GNOME), `Ctrl` (KDE), `Ctrl` (Emacs), `Ctrl` (Sublime Text), `Ctrl` (Sublime Text (macOS)), `Ctrl` (Visual Studio), `Ctrl` (Visual Studio (macOS)), `Ctrl` (TextMate), `Ctrl` (NetBeans), `Ctrl` (Eclipse), `Ctrl` (Eclipse (macOS)) twice. In the invoked popup, start typing bundler, select `bundle install` and press `Enter` (Windows), `⏎` (macOS), `⏎` (IntelliJ IDEA Classic (macOS)), `⏎` (macOS System Shortcuts), `Enter` (XWin), `Enter` (GNOME), `Enter` (KDE), `Enter` (Emacs), `Enter` (Sublime Text), `⏎` (Sublime Text (macOS)), `Enter` (Visual Studio), `⏎` (Visual Studio (macOS)), `Enter` (TextMate), `Enter` (NetBeans), `Enter` (Eclipse), `⏎` (Eclipse (macOS)).

* Select `Tools | Bundler | Install` from the main menu.

* Open the `Gemfile`, place the caret at any highlighted gem missing in the project interpreter and press `Alt+Enter` (Windows), `⌥ ⏎` (macOS), `⌥ ⏎` (IntelliJ IDEA Classic (macOS)), `⌥ ⏎` (macOS System Shortcuts), `Alt+Enter` (XWin), `Alt+Enter` (GNOME), `Alt+Enter` (KDE), `Alt+Enter` (Emacs), `Alt+Enter` (Sublime Text), `⌥ ⏎` (Sublime Text (macOS)), `Alt+Enter` (Visual Studio), `⌥ ⏎` (Visual Studio (macOS)), `Alt+Enter` (TextMate), `Alt+Enter` (NetBeans), `Ctrl+1` (Eclipse), `⌘ 1` (Eclipse (macOS)). Select Install missing gems using 'bundler' and press `Enter` (Windows), `⏎` (macOS), `⏎` (IntelliJ IDEA Classic (macOS)), `⏎` (macOS System Shortcuts), `Enter` (XWin), `Enter` (GNOME), `Enter` (KDE), `Enter` (Emacs), `Enter` (Sublime Text), `⏎` (Sublime Text (macOS)), `Enter` (Visual Studio), `⏎` (Visual Studio (macOS)), `Enter` (TextMate), `Enter` (NetBeans), `Enter` (Eclipse), `⏎` (Eclipse (macOS)). ![Gemfile inspection](https://resources.jetbrains.com/help/img/idea/2026.3/rm_gems_gemfile_install_intention.png)

2. (Optional) By default, if the current [project
interpreter](configuring-language-interpreter.html) does not have the required Bundler version specified in `Gemfile.lock`, RubyMine installs it.

To disable this option, perform [this
procedure](#disable-automatic-bundler-installation).

3. In the Bundle Install dialog, click Run to run the `bundle install` command without any arguments.

![Bundle Install dialog](https://resources.jetbrains.com/help/img/idea/2026.3/rm_gems_bundle_install_dialog.png)

If necessary, pass the required arguments when running this command, for example:

* `--without production`: install all gems except ones mentioned in the production group within the `Gemfile`.

* `--path vendor/bundle`: install gems to the `vendor/bundle` project directory. In this case, Bundler adds the `.bundle/config` file to a project’s root. RubyMine processes this configuration file to detect that gems are installed into `vendor/bundle`.

> **Tip:**
> You can predefine default arguments for Bundler commands. Refer to [this procedure](#customize-default-arguments).

4. Wait until gems are installed. The Run tool window will display this process:

![Bundler output](https://resources.jetbrains.com/help/img/idea/2026.3/rm_gems_installing_output.png)

You can see the installed gems in the `Settings | Language & Frameworks | Ruby Interpreters`  `Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Meta+Comma` (TextMate), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS)) page.

![Ruby Interpreters page](https://resources.jetbrains.com/help/img/idea/2026.3/rm_local_sdk_gems_page.png)

And you can also find them in the External Libraries node of the Project view `Alt+1` (Windows), `⌘ 1` (macOS), `⌘ 1` (IntelliJ IDEA Classic (macOS)), `⌘ 1` (macOS System Shortcuts), `Alt+1` (XWin), `Alt+1` (GNOME), `Alt+1` (KDE), `Alt+1` (Emacs), `Alt+1` (Sublime Text), `⌘ 1` (Sublime Text (macOS)), `Ctrl+Alt+L` (Visual Studio), `⌘ ⌥ L` (Visual Studio (macOS)), `Meta+1` (TextMate), `Ctrl+1` (NetBeans), `Alt+1` (Eclipse), `Alt+1` (Eclipse (macOS)).

![External libraries](https://resources.jetbrains.com/help/img/idea/2026.3/rm_gems_installed_external_lib.png)

## Customize Bundler settings

Use the Bundler menu to disable or enable automatic installation of the required Bundler version and customize default arguments for Bundler commands.

![Bundler settings menu](https://resources.jetbrains.com/help/img/idea/2026.3/rm_bundler_settings.png)

Procedure: Disable automatic Bundler installation

By default, RubyMine automatically installs the version of Bundler specified in your Gemfile.lock file. To disable this setting, perform the following steps.

1. Open settings (`Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Meta+Comma` (TextMate), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS))), and navigate to `Tools | Bundler`.

2. Clear the Always install the required version of Bundler checkbox.

Once this option is disabled, RubyMine installs the required version of Bundler only after you confirm it in the respective notification window.

Procedure: Customize default arguments

Use this option to provide default arguments for Bundler commands. This will allow you to run such commands without being asked for arguments on each Bundler command invocation.

1. Open settings (`Ctrl+Alt+S` (Windows), `⌘ Comma` (macOS), `⌘ Comma` (IntelliJ IDEA Classic (macOS)), `⌘ Comma` (macOS System Shortcuts), `Ctrl+Alt+S` (XWin), `Ctrl+Alt+S` (GNOME), `Ctrl+Alt+S` (KDE), `Ctrl+Alt+S` (Emacs), `Ctrl+Alt+S` (Sublime Text), `⌘ Comma` (Sublime Text (macOS)), `Ctrl+Alt+S` (Visual Studio), `⌘ Comma` (Visual Studio (macOS)), `Meta+Comma` (TextMate), `Ctrl+Alt+S` (NetBeans), `Ctrl+Alt+S` (Eclipse), `⌘ Comma` (Eclipse (macOS))), and navigate to `Tools | Bundler`.

2. Make sure the Use default arguments checkbox is selected and provide the required argument in the text field below.

## Install gems to a remote interpreter

If you are using a [remote Ruby interpreter](configuring-language-interpreter.html#add_remote_ruby_interpreter), RubyMine uses the `Gemfile` placed on a remote machine to install the gems. This requires configuring mappings between files of a local and remote project. To do this, click the Edit Path Mappings ![Edit Path Mappings](https://resources.jetbrains.com/help/img/idea/2026.3/app.vcs.folders.svg) button in `Settings | Language & Frameworks | Ruby Interpreters` .

![Ruby Interpreters page](https://resources.jetbrains.com/help/img/idea/2026.3/rm_gems_sdk_page_remote.png)

In the Edit Project Path Mappings dialog, specify the local and remote project root paths:

![Edit project path mappings](https://resources.jetbrains.com/help/img/idea/2026.3/rm_remote_attach_path_mappings.png)

After you configured mappings, install gems using the [Install Gems to Local Interpreter](#install_gems_local) instruction.

Note that when you are using a remote interpreter, RubyMine downloads gems from a remote machine to a local cache to be able to use code insight features. In this case, you may encounter a situation when new gems were installed on a remote machine outside the IDE. To update a set of gems stored in a local cache, click the Synchronize gems ![Synchronize gems](https://resources.jetbrains.com/help/img/idea/2026.3/app.actions.download.svg) button in the Ruby Interpreters page.

## Bundle exec

RubyMine provides the capability to run and debug Ruby and Rails applications, run tests, and deploy your code in a universal way - by using [run/debug configurations](run-debug-configuration.html). Run/debug configurations provide the default set of startup parameters that allow you to run the desired command quickly. You can execute any of these commands in the context of the bundle in the following way:

Procedure:

1. Open the Run/Debug Configuration dialog in one of the following ways:

* Select `Run | Edit Configurations` from the main menu.

* With the [Navigation bar](guided-tour-around-the-user-interface.html#navigation-bar) visible (`View | Appearance | Navigation Bar`), choose `Edit Configurations` from the run/debug configuration selector. ![Edit run configurations](https://resources.jetbrains.com/help/img/idea/2026.3/rm_open_run_config_from_navigation_bar.png)

* Press `Alt+Shift+F10` (Windows), `⌃ ⌥ R` (macOS), `⌥ ⇧ F10` (IntelliJ IDEA Classic (macOS)), `⌃ ⌥ R` (macOS System Shortcuts), `Alt+Shift+F10` (XWin), `Alt+Shift+F10` (GNOME), `Alt+Shift+F10` (KDE), `Alt+Shift+F10` (Emacs), `Alt+Shift+F10` (Sublime Text), `⌃ ⌥ R` (Sublime Text (macOS)), `Ctrl+Alt+Shift+R` (Visual Studio), `⌘ ⌥ ⇧ R` (Visual Studio (macOS)), `Meta+R` (TextMate), `Alt+Shift+F10` (NetBeans), `Alt+Shift+F10` (Eclipse), `⌃ ⌥ R` (Eclipse (macOS)) and then press `0` (Windows), `0` (macOS), `0` (IntelliJ IDEA Classic (macOS)), `0` (macOS System Shortcuts), `0` (XWin), `0` (GNOME), `0` (KDE), `0` (Emacs), `0` (Sublime Text), `0` (Sublime Text (macOS)), `0` (Visual Studio), `0` (Visual Studio (macOS)), `0` (TextMate), `0` (NetBeans), `0` (Eclipse), `0` (Eclipse (macOS)).

2. In the opened Run/Debug Configurations dialog, select the required configuration and open the Bundler tab.

3. Configure the Run the script in the context of the bundle ('bundle exec') option:

* Auto-detection: select this option to run your code with `bundle exec` when it is possible. > **Note:** > When the Auto-detection option is enabled, RubyMine checks whether the following conditions are met: > > > > * `Gemfile` and `Gemfile.lock` are present > > * The version of the `bundler` gem specified in `Gemfile.lock` is also installed in the run/debug configuration's interpreter > > > > In case either of these conditions isn't met, the executed command will remain without any changes.

* Disabled: select this option to disable the use of `bundle exec`.

Click OK.

## Run bundle check in dry mode

RubyMine provides an option to run `bundle check` in dry mode. In this case, Bundler will not create or update your lockfile.

Procedure:

1. In the main menu, go to `Help | Find Action` `Ctrl+Shift+A` (Windows), `⌘ ⇧ A` (macOS), `⌘ ⇧ A` (IntelliJ IDEA Classic (macOS)), `⌘ ⇧ P` (macOS System Shortcuts), `Ctrl+Shift+A` (XWin), `Ctrl+Shift+A` (GNOME), `Ctrl+Shift+A` (KDE), `Escape, X` (Emacs), `Ctrl+Shift+P` (Sublime Text), `⌘ ⇧ P` (Sublime Text (macOS)), `Ctrl+Shift+A` (Visual Studio), `⌘ ⇧ A` (Visual Studio (macOS)), `Meta+Shift+A` (TextMate), `Ctrl+I` (NetBeans), `Ctrl+Shift+A` (Eclipse), `⌘ 3` (Eclipse (macOS)).

2. Start typing `Run silent bundle check with --dry-run`. Select the option and press `Enter` (Windows), `⏎` (macOS), `⏎` (IntelliJ IDEA Classic (macOS)), `⏎` (macOS System Shortcuts), `Enter` (XWin), `Enter` (GNOME), `Enter` (KDE), `Enter` (Emacs), `Enter` (Sublime Text), `⏎` (Sublime Text (macOS)), `Enter` (Visual Studio), `⏎` (Visual Studio (macOS)), `Enter` (TextMate), `Enter` (NetBeans), `Enter` (Eclipse), `⏎` (Eclipse (macOS)) to enable it.

![Enabling dry mode](https://resources.jetbrains.com/help/img/idea/2026.3/rm_bundler_dry_mode.png)

Once you've enabled this option, you will need to maintain your lockfile yourself. After changing your `Gemfile`, run `bundle check`/`bundle lock` to update your lockfile.

