Thursday, April 11, 2024
HomeRuby On RailsRubyMine 2023.2 With AI Assistant Is Out!

RubyMine 2023.2 With AI Assistant Is Out!

RubyMine 2023.2 is now publicly out there! You possibly can obtain it from our web site or through the free Toolbox App.

The most recent model of probably the most clever Ruby and Rails IDE brings the brand-new AI Assistant and is full of different enhancements, together with Turbo code completion in Ruby on Rails initiatives, an up to date UI, efficiency enhancements, new options in RBS help, and extra.

Learn on to be taught extra about the important thing updates, or go to our What’s New web page for extra particulars.

Ruby and Rails

Assist for Turbo Rails completion

Within the earlier launch, we added help for Turbo Rails, which helps you to use code completion in your fashions to entry strategies to Turbo Stream. We’ve now up to date Turbo Rails code completion and perception for fashions, controllers, and views. This lets you outline model-specific Turbo Stream templates that present real-time updates to the consumer facet when the mannequin is created, up to date, or deleted.

Assist for import maps

We’ve carried out help for utilizing import maps with Ruby and Ruby on Rails code, together with:

  • Scope context for the config/importmap.rb file. Which means that self now has the proper sort and that autocompletion and resolve are actually out there for the pin and pin_all_from strategies.
  • Primary declaration and reference help for import map modules inside Ruby code.
  • Go to declaration, in addition to Discover usages to and from declarations and references, now work for import map modules.
  • File references within the pin and pin_all_from calls in config/importmap.rb. The file references are actually current for the pinunder argument (pin ‘my_module’, below: ‘<caret>’), and for the primary argument in pin_all_from (pin_all_from ‘<caret>’). Moreover, completion and resolve are actually out there for these arguments.

Code perception for Rails retailer accessors

Code perception is now out there for retailer accessors in Rails. Code completion and determination work for attributes outlined through .store_accessor and soiled monitoring strategies, reminiscent of u.partner_name_changed?. Attributes outlined through retailer or store_accessor are additionally out there in validations (for instance, validates_presence:partner_name).

Customized sort renderers within the debugger

RubyMine now permits you to customise the show codecs of various objects within the Debug instrument window. That is performed by way of the usage of renderers, that are distinctive configurations related to particular varieties that dictate how cases of these varieties are introduced within the Debug instrument window. By using customized expressions, these renderers provide a excessive degree of flexibility for displaying information. You possibly can configure customized renderers in Settings | Construct, Execution, Deployment | Debugger | Information Views | Ruby Kind Renderers.

AI Assistant (Beta)

Beginning with this launch RubyMine gives a big new function – AI Assistant. Designed to make your coding expertise smoother and extra environment friendly, it supplies an entire new degree of performance and help.

The AI capabilities are powered by the JetBrains AI service, which seamlessly connects you to a variety of huge language fashions (LLMs), unlocking quite a lot of AI-powered options throughout a number of JetBrains merchandise.

On this preliminary launch, the service consists of OpenAI fashions, guaranteeing entry to cutting-edge AI know-how. Moreover, JetBrains has developed a number of smaller fashions which might be additionally hosted inside the service. This mixture supplies you with a various set of AI-powered functionalities.

AI chat

Begin a dialog with the LLM through the AI Assistant instrument window. You possibly can ask questions, focus on duties, or collaborate with AI Assistant. The IDE will present data that’s related to your mission, together with particulars particular to the programming languages and applied sciences utilized in it. When you’re happy with the outcomes, you may insert the AI-generated code into the editor by clicking the Insert Snippet at Caret button or by merely copying and pasting it.

If you wish to inquire a few specific code fragment, choose it within the editor and select an motion from the AI Actions menu. You possibly can entry the menu both from the editor’s context menu or by utilizing the Alt+Enter shortcut.

The New chat utilizing choice motion helps you to present your individual immediate or question. You may also use different normal AI-assistance prompts, reminiscent of Clarify code, Recommend refactoring, or Discover potential issues, to boost your interplay.

Commit message technology

The Commit Adjustments dialog now has a Generate Commit Message with AI Assistant button. Click on it to ship your change differentials to the LLM, which can then generate a descriptive commit message summarizing your modifications.

Documentation technology with AI Assistant

Should you’d like an LLM to generate documentation for a declaration for you, entry the AI Actions menu and choose Write documentation. The IDE will generate the static portion of the remark, whereas the AI will generate the precise documentation textual content in your behalf, saving you effort and time.

Accessing AI options

To entry the AI options, you’ll must be logged in to the JetBrains AI service utilizing your JetBrains Account. You possibly can log in both from the AI Assistant instrument window or from Settings | Instruments | AI Assistant.

Reworked hamburger menu for Home windows and Linux

Now, if you click on on the hamburger menu icon, the menu components will seem horizontally over the toolbar. This supplies a extra intuitive and streamlined expertise. Moreover, we have now added the choice to transform this menu right into a separate toolbar. To allow this function, navigate to View | Look | Principal menu as a Separate Toolbar. When you choose this feature, the menu might be displayed as a definite toolbar, providing an alternate format for simpler entry to the toolbar components.

Up to date window controls on macOS

On macOS, if you use full display screen mode with the brand new UI, the window controls are actually displayed proper in the principle toolbar – not within the floating bar as earlier than.

Coloured mission headers within the new UI

The most recent UI replace introduces coloured mission headers, that are designed that will help you navigate between a number of open initiatives. Now you can assign a definite colour and icon to every mission, offering a visible support for distinguishing them inside your workspace. Headers have predefined colours by default, however you may customise them based on your preferences. To assign a brand new colour to your mission, merely right-click on its header and entry the context menu. From there, select the Change Toolbar Colour choice and choose your required colour. If you might want to deactivate this function, you may merely uncheck the Use Challenge Colour In Toolbar choice within the context menu.

RBS help

Assist for renaming typos

In earlier releases, we added spell-checking for interfaces, sort aliases, and feedback in RBS. On this launch, we have now carried out a brand new quick-fix that permits you to substitute typos in image names with the steered corrections.

Class and module aliases formatting

Formatting performance is now out there for the category and module aliases.

Сode perception for RBS use syntax

RubyMine’s code perception is now out there for the use syntax in RBS. Listed below are among the enhancements that we’ve carried out:

  • All namespaces used inside a use clause now have reference help.
  • The goal of an imported use clause now has reference help.
  • When resolving a easy identify, resolve targets are prioritized within the following order: sort variables first, adopted by use clauses in reverse order. Use clauses that happen final have the next precedence, permitting you to shadow a use clause that comes earlier.
  • Autocomplete for wildcard use clauses now features a * character.
  • An implicit reference is now supplied for the * characters in wildcard use clauses.
  • Use clause aliases are acknowledged as separate entities, and code perception actions reminiscent of Go to declaration, Discover usages, and Rename are actually out there for them.
  • Whenever you acquire a sort in Ruby from RBS (Ruby Signature), it would show the anticipated sort that the use clause and/or alias targets.
  • All RBS inspections are up to date to work with use clause aliases.
  • Completion inside use clauses capabilities appropriately, now that updates have been made to deal with insertions correctly.
  • When invoking completion inside a file, use clause aliases are included within the completion record.
  • Use clause alias names now have spell-checking help.

Annotations and inspections to be used directives

We proceed to help this new function in RBS, we’ve added some annotations and inspections for misused directives. Right here is the record of enhancements:

  • RubyMine now annotates use clause aliases when their case doesn’t match.
  • We’ve added an inspection for an unconventional use alias identify, which behaves the identical as different naming conference inspections.
  • We’ve added an inspection for unused use clauses with a quick-fix to “optimize use clauses”, which removes the unused ones.
  • We’ve added an inspection for pointless qualifiers. Qualifiers are typically pointless when there’s a namespace or use clause that imports the precise identify.
  • We’ve added a quick-fix for easy unresolved references (these with no qualifiers) that suggest including a use clause to import the identify if there’s one out there.
  • There’s now help for the Optimize imports motion, which solely removes unused imports and behaves the identical because the inspection.

Formatting of use directives

As a part of our ongoing efforts to boost help for the use syntax in RBS, we have now added help for the formatting of use directives. This enchancment ensures that the formatting is constant and follows the established requirements.

Code perception for RBS class and module aliases

RubyMine now supplies code perception and navigation options, reminiscent of resolve, completion, discover usages, rename, and extra, in addition to sort inference for sophistication and module aliases. Inspections reminiscent of “Duplicate declarations” or “Conflicting sort variable variance” now help class and module aliases, and new inspections for detecting cyclic or inconsistent alias declarations have been added.


Up to date lexer

We gave the RubyMine lexer a significant overhaul, which dramatically elevated the lexing and parsing pace.

Filtering information throughout gem sync for the Docker and Docker Compose SDKs

We’re regularly bettering the efficiency of distant interpreters in RubyMine. On this launch, we optimized gem synchronization for the Docker and Docker Compose SDKs. We achieved this by making a slight change to how we sync gems for the Docker Compose SDKs. Beforehand, we had two modes for copying gems: utilizing the Docker cp command to repeat gems from working containers and utilizing the Docker engine API to repeat gems from a picture. We now solely use the Docker Engine API, which can be utilized for copying gems from each a picture and a working container. Nonetheless, you may nonetheless select your most well-liked technique for copying gems by going to Settings | Construct, Execution, Deployment | Docker | Ruby Settings.

These are probably the most notable updates launched in RubyMine 2023.2. Try the What’s New web page or consult with the discharge notes for extra data.

You possibly can obtain RubyMine 2023.1 from our web site or through the Toolbox App.

We’d love to listen to extra about your expertise with RubyMine. Schedule a 40–60 minute name with us so we will focus on and reply any questions you might have!

To be taught in regards to the latest options as they arrive out, please comply with RubyMine on Twitter. We submit product information and ideas a number of instances per week.

We invite you to share your ideas within the feedback beneath and counsel and vote for brand new options within the concern tracker.

Comfortable creating!

The RubyMine workforce



Please enter your comment!
Please enter your name here

Most Popular

Recent Comments