What’s New in RubyMine 2023.3

Improved AI Assistant support, custom paths for Rails applications and engines, code insight for Rails 7.1 strict locals, extra declarations from RBS, update for Debugger type renderers, RuboCop in server mode, Brakeman code inspections, and more.

AI Assistant General Availability

JetBrains AI Assistant is now generally available with a number of new and improved features to increase your productivity in JetBrains IDEs.

AI-generated name suggestions

Support for AI-generated name suggestions

You can now enable AI-generated name suggestions for local variables and parameters in your Ruby code. This action is available when you use the Rename refactoring inline. To enable name suggestions, select the Provide AI-generated name suggestions checkbox in Settings | Tools | AI Assistant.

AI assistant context

Improved Ruby contexts

We’re continuing to improve Ruby contexts and the way LLMs analyze your codebase. These changes influence how AI Assistant generates documentation, explains your Ruby code, recognizes file contents, and more.

Unit test generation

Unit test generation

With AI Assistant, you can effortlessly generate tests for public methods in your Ruby or Rails application. Select the method you want to cover with tests, and press ⌥ + Enter on macOS or Alt + Enter on Windows. From the context menu, select AI Actions and then Generate Unit Tests.

Use AI Assistant in RubyMine as a supplemental feature with a JetBrains AI Service subscription.

Rails

Custom paths for Rails

Custom paths for Rails applications and engines

RubyMine recognizes when you use custom paths in your Rails applications and engines. In addition to the default paths, such as app, app/controllers, and app/models, the IDE recognizes any other locations in your project when configured. This enables you to redefine the default structure and still benefit from RubyMine’s code insight features. To set up the custom paths, navigate to Settings | Languages & Frameworks | Rails | Paths.

Auto-import of Rails paths

Auto-import of Rails paths

We implemented a new option to automatically detect custom paths within your Rails application. Every time you open your project, RubyMine attempts to import the Rails paths configuration in the background.

Code insight for elements outside default location

Code insight for models, controllers, and mailers stored outside of their default locations

All of your favorite code insight features, such as navigation and type support, will now work with models, controllers, and mailers, even if they are outside of their default directories.

Strict locals

Сode insight for Rails 7.1 strict locals

RubyMine now supports resolution, completion, Find Usages, Rename, and navigation features for strict locals.

Type inference

Type provision for self-type bindings

Type provision for custom self-types inside blocks

RubyMine now has support for customizing the self-type of blocks from RBS to Ruby. This feature is beneficial for DSLs and will help RubyMine recognize them, enhancing code insight.

Annotation to specify self-type of blocks

Custom annotation to specify the self-type of blocks

Now, by utilizing a YARD-like comment, you can explicitly state the self-type of blocks directly within them.

Extra declarations from RBS

Support for extra declarations from RBS

We’ve implemented basic support to recognize extra declarations from RBS when they are absent in your Ruby files. This is particularly beneficial for projects that extensively use reflection, as it allows for these declarations to still be present in completion and other RubyMine features. The feature is available for classes, modules, constants, methods, and variables.

Debugger

Debugger type renderers

Update for debugger type renderers

You no longer need to restart the debugger to apply changes to the type renderers. Simply click the Apply button, and RubyMine will reload them instantly.

Tools and Libraries

Rubocop server mode

RuboCop in server mode

RubyMine supports running RuboCop in server mode automatically. For this functionality to work, make sure the following requirements are met:

  • Linux or MacOS
  • Local Ruby MRI 2.3 or later
  • RuboCop 1.31 or later
Brakeman

Brakeman code inspections

Now, you can conveniently see Brakeman’s insights within RubyMine in a user-friendly format. Tackle security issues promptly, with easy access to Brakeman’s documentation, confidence indicators, and more. Make sure that you have the brakeman gem installed, and then go to Code | Analyze Code | Run inspection by name and launch the analysis.

rspec-parameterized

Parameterized specs with rspec-parameterized

RubyMine provides comprehensive support for the RSpec::Parameterized syntax, including recognition, resolution, and completion suggestions. We’ve also implemented run/debug configurations to enhance your testing experience.

let_it_be support

Fixture declarations with let_it_be

We’ve added support for fixture declarations in RSpec tests using let_it_be blocks. This includes features such as variable resolution, syntax highlighting, automatic handling of do block insertion for before_all, and more. To enable the functionality, you need to install the test-prof gem.