Early Access Program

RubyMine 2022.3 EAP2

RubyMine 2022.3 EAP2 is now available. Here are the most notable new features of this build:

RSpec

Support for example group aliases: xdescribe, xcontext, fdescribe, fcontext

RubyMine recognizes the xdescribe, xcontext, fdescribe, and fcontext example group aliases and shows such blocks in the Structure tool window (⌘ 7 on macOS or Alt+7 on Windows). Now, you can also run these tests using the gutter icons right in the editor.

Completion of shared context names

In this build, we’ve added support for completion of shared contexts and examples. RubyMine offers completion options from any defined shared contexts and examples.

Filtering of completion options will be coming next, so stay tuned.

Navigation between controllers and request and routing specs

RubyMine links request and routing specs to their respective controllers. Open the necessary request or routing spec and press ⇧ ⌘ T on macOS or Ctrl+Shift+T on Windows to navigate to the controller used as a test subject. You can use the same shortcut to navigate from the controller file to the corresponding spec.

You can always find request specs in the spec/requests/ folder, and routing specs in the spec/routing/ folder.

Other improvements

Clickable URLs in string literals

You can now open URLs directly from your Ruby code. While holding (on macOS) or Ctrl (on Windows), click the URL to open it in your default browser.

Alternatively, place the caret next to the desired URL and press ⌘ B on macOS or Ctrl+B on Windows.

Support for the Devise gem

In this release, we’ve added support for the Devise gem as well as several of code assistance features for the Devise methods, including:

RuboCop as an external formatter

Starting with this release, RubyMine can use RuboCop running in server mode as an external formatter.

This feature is experimental and to try it, you need to select the ruby.external.formatter key in the Registry.

Once the feature is enabled, you can configure the external formatter. Go to Settings / Preferences | Editor | Code Style | Ruby. Then open the Other tab, toggle the Use external formatter checkbox, and select Rubocop in the Select external formatter field.

To reformat a code fragment using RuboCop, select the necessary code in the editor and press ⌥ ⌘ L on macOS or Ctrl+Alt+L on Windows.

If you disable the use of RuboCop as an external formatter, RubyMine will use its internal formatter again. The same is true in cases where the RuboCop gem is not added to your Gemfile.

Updated Ruby template header

We’ve included the # frozen_string_literal: true comment in the header of the default Ruby file template. Previously, you could edit the template manually in Settings / Preferences, but now everything works out of the box.

When you create a new Ruby file, class, or module, RubyMine will add the comment at the beginning of the file automatically.

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 in this EAP build is available in the release notes.

To learn about the newest features as they come out, please follow RubyMine on Twitter. We post product news and tips several times a week.

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

Happy developing!

The RubyMine team

image description