Today we are happy to announce the opening of the Early Access Program (EAP) for RubyMine 2020.1! You can get EAP builds from our website, use the Toolbox App, or update to them using snaps if you’re an Ubuntu user. Note that the EAP builds are free to use but expire within 30 days of the build date.
In the first EAP build, you’ll find new options for working with Docker Compose SDKs, support for running Rake tasks from the gutter area, an improved experience for creating tests, and some other nice features. We’ve also fixed up several annoying little issues related to the debugger and to Docker support. Let’s take a look at the most interesting improvements first.
- Creating tests
- Running Rake tasks from the gutter
- Smart execution of terminal commands
- Docker Compose improvements
- Machine-learning completion for Ruby
- Important bug-fixes and other useful features
- Platform-wide changes
With this EAP, we’ve improved the process of creating new tests when navigating from a test subject. RubyMine can now create a new test for any class, replicating the directory structure based on the path to the test subject. For example, our Rails application has two test folders: the test folder for Minitest tests and the spec folder without tests for RSpec. If you open the app/models/user.rb file containing a User model and select Navigate | Go to Test (⇧⌘T / Ctrl+Shift+T) from the main menu, RubyMine will display the following popup.
Select Create New Test here. In the invoked dialog, RubyMine offers you the choice of whether to create a new test in a new spec/models folder that does not yet exist or add a test in test/models.
After choosing spec/models and clicking OK, you only need to provide the class name and choose whether to create a test from scratch or use a predefined test template.
Press Enter to finish, and that’s it!
Running Rake tasks from the gutter
RubyMine already provides a quick and easy way to run Rake tasks using the Run Anything popup. Starting with 2020.1, you can also run, debug, and profile your tasks right from the gutter menu.
As always, RubyMine automatically creates corresponding run/debug configurations for the tasks that were run.
Smart execution of terminal commands
RubyMine provides a nice coherent user experience for executing various actions. For example, when you run tests, you can quickly specify the required environment in the dedicated dialog, examine test results in the Run tool window, and then reuse the automatically created test configuration for running tests again. With v2020.1, you can take advantage of these features when executing commands from the embedded RubyMine terminal emulator. Once an input command is matched, the terminal highlights it.
You can run this command by pressing Ctrl+Enter. The IDE will show a special UI for running this command.
To try this feature out, enable the terminal.shell.command.handling flag in the Experimental Features dialog.
Tip: To invoke Experimental Features, press Ctrl+Shift+A / ⇧⌘A and start typing ‘Experimental Features’.
Docker Compose improvements
With RubyMine, you can run, debug, and test your application in a particular environment by using Docker Compose as a remote interpreter. To work with the Ruby interpreter inside Docker, the IDE analyzes the Ruby environment by running specific commands inside a container, such as which ruby, gem env, and rbconfig. Then, RubyMine copies the Ruby SDK and gems to a local cache to enable the use of code insight features, such as code completion or navigation.
With v2020.1, you can adjust how the IDE interacts with Docker to analyze the Ruby environment. Open the Settings/Preferences dialog and go to the Ruby Docker Integration page.
The Interaction mode allows you to specify how the IDE runs commands for analyzing the Ruby environment. For example, you can select whether to execute these commands in a target container (docker-compose exec), create a new environment (docker-compose run), or use the dedicated IDE auxiliary container for this purpose.
Machine-learning completion for Ruby
In v2019.3, we’ve introduced machine-learning (ML) completion for Ruby. This improves the code completion feature by reordering elements in the completion popup and ranking the more relevant items higher. In the image below, you can see the position changes for members exposed by the User model class with the enabled ML-completion: for example, the find_by method was moved up one position compared to the default completion mechanism, while find_by_sql dropped four positions.
You can enable the ML-completion and change its settings on the Editor | General | Code Completion page of the Settings/Preferences dialog.
Note that work on this feature is still in progress and we’re constantly working to improve the quality of ML-completion.
Important bug-fixes and other useful features
In addition to the features mentioned above, we’ve implemented the following fixes:
- We fixed an issue that caused attaching to a process to kill it. RUBY-22070
- The interactive console is available now when debugging under the Docker Compose SDK. RUBY-21611
- We fixed the issue related to starting the debugger with jruby-18.104.22.168. RUBY-25336
- A code coverage report is now shown when using the Ruby interpreter managed by chruby. RUBY-23732
Other notable changes include the following:
- RubyMine now enables you to install the Bundler whose version differs from the one installed in the SDK. RUBY-25520
- You can now search for usages of a parent method. RUBY-24658
- Navigate | Go to Super Method now allows you to select the exact super method you want to navigate. RUBY-25554
- In the Structure view, you can filter out the variables to look only at methods. RUBY-11850
- We’ve added support for Module#module_function. RUBY-15259
In addition to the specific improvements for Ruby and Rails, the following changes have been made for RubyMine and other IntelliJ-based IDEs:
- With the v2020.1 EAP, we are fully moving to JetBrains Runtime 11 (JBR11), and will no longer distribute builds with JetBrains Runtime 8 (JBR8). Please note that all the IntelliJ IDEA 2020.1 updates, both in the IDE and the Toolbox App, will come with JBR 11.
- RubyMine and other IntelliJ-based IDEs now use the brand-new JetBrains Mono font (Settings/Preferences | Editor | Font).
- The IDEs now use the reworked Interactively Rebase from Here dialog that allows you to edit, combine, and remove your previous commits.
- The light theme is now unified for all operating systems and goes by the name IntelliJ Light.
- The Quick documentation popup appears on mouseover by default. You can disable this option in Settings/Preferences | Editor | General.
Please keep in mind that v2020.1 is still under heavy development and, therefore, the EAP builds might be unstable. Let us know about any issues you come across here in the comments, in our issue tracker, or on Twitter.
Your RubyMine team