# Project security

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

When you open a Ruby/Rails project, RubyMine runs gem executables that may contain harmful code from the project.

To prevent potential security risks, RubyMine lets you decide how to open a project if it doesn't recognize the project source.

> **Note:**
> You can configure [trusted locations](#trust_sources) to automatically load projects from particular directories.

## Ruby/Rails projects security

When you open a project or a file for the first time, the IDE shows the Trust dialog. This helps to ensure that the project or the file is safe to perform the following actions:

Project:

When you open a Ruby/Rails project from an unknown source, RubyMine displays a notification and lets you decide how to proceed.

![Untrusted Project](https://resources.jetbrains.com/help/img/idea/2026.3/rm_untrusted_project_first_open.png)

You can select one of the following actions:

* Trust Project: select this option to open the project and allow RubyMine to [check for missing gems](using-the-bundler.html), run [RuboCop](rubocop.html) (if enabled), and load a list of available [Rake tasks](rake.html) and [Rails generators automatically](creating-rails-application-elements.html).

* Preview in Safe Mode: select this option to prevent the silent execution of Ruby tools using the project code. In this case, RubyMine's functionality will be limited. You can always switch to trusted mode using the [notification panel in the editor](#editor_notification).

* Don't Open: select this option to cancel opening the project.

> **Note:**
> Select the Trust all projects in <b>'⋖path⋗'</b> folder checkbox to trust the directory from which you are trying to open the project. Next time you open a project from that directory, it will be opened and loaded automatically.

RubyMine remembers when you trust a project on the current machine, but you will need to re-trust the project for each machine you open it on.

Until you trust the project, RubyMine will provide limited functionality. When trying to run Rake tasks or Rails generators, RubyMine won't suggest them in the  Run Anything  window, except for `rake --tasks` and `rails generate`.

However, you can still browse the project sources and open them in the editor. Code navigation and completion will be limited to project files and may not include sources of external libraries.

When you open a file in the project, RubyMine will display a notification panel in the editor stating that the project is untrusted. You can click the Trust project link to enable the full RubyMine functionality at any time. If you ignore the notification banner, RubyMine's functionality will still be limited.

![The Trust project notification](https://resources.jetbrains.com/help/img/idea/2026.3/rm_editor_notification_trust_project.png)

## Trusted locations

You can configure what sources RubyMine should consider safe and  trust implicitly. For example, you can add your home directory to the trusted locations. In this case, RubyMine will implicitly trust all projects located there.

> **Warning:**
> When you launch an instance of RubyMine in the headless mode using a command-line launcher, the project opens in the trusted mode by default.

Procedure: Configure trusted locations

1. In the Settings dialog (`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))), go to `Appearance & Behavior | Trusted Locations`.

2. On the Trusted Locations settings page, specify the local directories that the IDE should trust. Click OK to save the changes.

The next time you open a project from one of those locations, RubyMine will implicitly trust it.

