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.
JetBrains AI Assistant is now generally available with a number of new and improved features to increase your productivity in JetBrains IDEs.
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.
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.
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.
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.
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.
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.
RubyMine now supports resolution, completion, Find Usages, Rename, and navigation features for strict locals.
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.
Now, by utilizing a YARD-like comment, you can explicitly state the self-type of blocks directly within them.
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.
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.
RubyMine supports running RuboCop in server mode automatically. For this functionality to work, make sure the following requirements are met:
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
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
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.