Ruby logo

The RubyMine Blog

The Ruby on Rails IDE

Early Access Program News

RubyMine 2021.2 EAP Is Open!

Hello and welcome to RubyMine’s second Early Access Program of 2021!

Over the next couple of months, we will be publishing posts about the new features of the upcoming 2021.2 version. To learn about them as they come out, feel free to subscribe to the blog updates or follow us on Twitter.

RubyMine 2021.2 EAP

As always, you are welcome to try the new features before the official release, and we are looking forward to hearing your feedback!

DOWNLOAD RUBYMINE 2021.2 EAP

Here are the main highlights of this week’s build.

Ruby 3 RBS support

In this release, we aim to make working with RBS code more intuitive and efficient. Specifically, we’re making essential RubyMine features that you already use for regular Ruby code work for .rbs files as well.

Write, read, and navigate RBS code with ease

RubyMine now automatically formats RBS code to make it look neat and easy to read. For example, RubyMine automatically adjusts indentation on new lines, and when you press backspace, it deletes blank spaces to the nearest indent position:

RBS automatic indentation

The end keyword is automatically added for constructs like classes and modules:

RBS auto-insertion of the end keyword

Comments also work just like they do in .rb files – pressing Enter adds a new commented line:

Formatting RBS comments

If you have several partial declarations in your .rbs file, you can easily navigate between them using icons in the gutter:

RBS navigation between partial declarations

Hovering a cursor over an RBS entity (while holding ⌘/Ctrl) now shows its description, and different icons indicate method visibility:

RBS long description

The Find usages action in RBS will also look for your searches in text occurrences, such as comments and string literals.

Get more relevant code assistance

This version provides more relevant code completion because it takes into account more information provided by RBS files. This includes block parameters, tuple types, type variables, data returned by the methods, and instance variables.

Improved completion

Enjoy intuitive refactoring

We’re continuing to implement refactoring features for RBS. For example, when you rename an element in RBS code, RubyMine will try to find and rename text occurrences like comments and string literals:

Rename refactoring in RBS

The Rename refactoring now skips the prefix when you rename interfaces and variables, just like it does for Ruby code.

Features like these make refactoring familiar and intuitive, especially for those who already take advantage of RubyMine’s capabilities. If you would like to learn more about refactoring in RubyMine, check out the refactoring topic in the docs or watch our video tutorial.

Catch more potential errors

Access to information stored in .rbs files enables RubyMine to check code for more potential errors. For example, if an optional type is specified in RBS, RubyMine shows an error if you try to invoke a method on it without first checking that it’s non-nil:

Error for no nilability check

RubyMine also keeps an eye out for errors in .rbs files themselves, such as the inclusion of modules or declaration of singleton methods in interfaces, and warns you about them.

Early Access Program Key Facts

  • The EAP version of RubyMine is free to use. It will expire in 30 days.
  • This is pre-release software, and it may not work as intended.
  • You can install the EAP version alongside a stable version of RubyMine.
  • EAP versions of RubyMine report statistics by default. These statistics help us improve user experience. You can opt-out by changing the settings in Preferences/Settings | Appearance & Behavior | System Settings | Data Sharing.
  • EAP versions have their own documentation as well.

Join theEarly Access Program

You are welcome to download the latest EAP build from our website or via the Toolbox app. The full list of closed tickets in this EAP build is 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 features in the issue tracker.

Happy Developing!
The RubyMine team

Discover more