Early Access Program RubyMine

RubyMine 2024.2 Early Access Program Update

Hi everyone!

We’re back with an update on the state of the RubyMine 2024.2 Early Access Program. In preparation for the release, we’ve been working on improving AI Assistant, as well as providing support for Rails 8 features, Stimulus, and more.
You can download the latest EAP build from our website, via the free Toolbox App, or by using snaps for Ubuntu.

AI features

For version 2024.2, our focus is on improving AI Assistant completion. With this in mind, we enhanced AI Assistant to make it work better with Ruby- and Rails-specific contexts.

For multiline code completion, we’ve upgraded the existing prompts to request specific technological details, including the Ruby version in use, if it is a Rails or Gem project, the test framework in use, the name of the current file, and the five most popular gems in the project.

Moreover, the AI Assistant completion feature can now be activated at the end of lines that have content, meaning it works after statements following a . (as in str.<caret>) and ::, or after binary expressions.

We also improved how AI Assistant works with the context of Rails applications. For example, when requesting code explanation on a controller, AI Assistant now takes into account the corresponding model and routes.

Rails

Completion in Kamal configuration files

RubyMine now provides code completion for Kamal configuration files. When editing deploy.yaml and .env files, you’ll see completion suggestions for the Kamal-specific properties.

Code insight for rate limiting

Rails 8 introduces the rate_limit function for use with controllers. To take advantage of this new feature, we implemented code insight for rate limiting, including code highlighting and completion.

Code insight for browser guards

Another feature coming in RubyMine 2024.2 is code insight for the browser guard method. We added highlighting for the allow_browser function, as well as completion for browser names and only arguments.

Stimulus

RubyMine 2024.2 now includes built-in support for Stimulus, a JavaScript framework that integrates with static HTML and current DOM elements. The Stimulus plugin is bundled with RubyMine and works in .erb files. The stimulus-rails gem is shipped by default with Rails starting from version 7.

RubyMine offers a range of features to facilitate working with Stimulus, including code completion, navigation, and rename refactorings.

Keep an eye out for upcoming blog posts that will guide you how to effectively use Stimulus in RubyMine.

Other features

Completion for Ruby-related commands in the new terminal

The new terminal provides automatic completion for commands, options, subcommands, arguments, and more. In RubyMine 2024.2, we added completion for the following commands: ruby, rails, rake, bundle, rbenv, irb, pry, rbs, and rspec.

As we continue enhancing completion for CLI commands, certain completion options may not be accessible or may differ from shell-based completion.

Markdown rendering in Reader mode and quick documentation

As Rails 8 uses Markdown documentation instead of RDoc, we implemented Markdown rendering, making it available in Reader mode and quick documentation popups. The functionality will work if a file has the :markup: markdown directive at the beginning or if there’s an .rdoc_options file in the project root with the line markup: markdown in it.

Custom RuboCop configurations

In this release, we introduced a new option to select a custom configuration file for RuboCop, available in Settings | Tools | RuboCop. RubyMine passes the path to your configuration file as a RuboCop command argument with the --config option, which ensures it works even when a remote SDK is used.

If you don’t specify any file, RubyMine will use either .rubocop.yaml or the default settings if the former is not found in your project.

Formatter settings

We implemented a new formatter setting in RubyMine to control spaces inside array literals. The setting aligns with the behavior of RuboCop and can be accessed from Settings | Editor | Code Style | Ruby | Spaces | Within array literals.

Join the Early Access Program

You can download the latest EAP build from our website or via the Toolbox App. The full list of closed tickets for this EAP build is available in the release notes

We encourage you to share your thoughts in the comments below and to create and vote for new feature requests in the issue tracker.

Happy developing!

The RubyMine team

image description