{"id":487411,"date":"2024-07-01T16:15:42","date_gmt":"2024-07-01T15:15:42","guid":{"rendered":"https:\/\/blog.jetbrains.com\/?post_type=ruby&#038;p=487411"},"modified":"2024-11-18T18:06:46","modified_gmt":"2024-11-18T17:06:46","slug":"rubymine-2024-2-early-access-program-update","status":"publish","type":"ruby","link":"https:\/\/blog.jetbrains.com\/zh-hans\/ruby\/2024\/07\/rubymine-2024-2-early-access-program-update","title":{"rendered":"RubyMine 2024.2 Early Access Program Update"},"content":{"rendered":"\n<p>Hi everyone!<\/p>\n\n\n\n<p>We\u2019re back with an update on the state of the RubyMine 2024.2 Early Access Program. In preparation for the release, we\u2019ve been working on improving AI Assistant, as well as providing support for Rails 8 features, Stimulus, and more.<br>You can download the latest EAP build from our <a href=\"https:\/\/www.jetbrains.com\/ruby\/nextversion\/\" target=\"_blank\" rel=\"noopener\">website<\/a>, via the free <a href=\"https:\/\/www.jetbrains.com\/toolbox-app\/\" target=\"_blank\" rel=\"noopener\">Toolbox App<\/a>, or by using <a href=\"https:\/\/snapcraft.io\/rubymine\" target=\"_blank\" rel=\"noopener\">snaps<\/a> for Ubuntu.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">AI features<\/h2>\n\n\n\n<p>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.<\/p>\n\n\n\n<p>For multiline code completion, we\u2019ve 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.<\/p>\n\n\n\n<p>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 <code>.<\/code> (as in <code>str.&lt;caret&gt;<\/code>) and <code>::<\/code>, or after binary expressions.<\/p>\n\n\n\n<p>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.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Rails<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Completion in Kamal configuration files<\/h3>\n\n\n\n<p>RubyMine now provides code completion for Kamal configuration files. When editing deploy.yaml and .env files, you\u2019ll see completion suggestions for the Kamal-specific properties.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"1360\" height=\"600\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2024\/06\/kamal.gif\" alt=\"\" class=\"wp-image-487412\"\/><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\">Code insight for rate limiting<\/h3>\n\n\n\n<p>Rails 8 introduces the <a href=\"https:\/\/www.shakacode.com\/blog\/rails-8-adds-rate-limiting-to-action-controller\/\" target=\"_blank\" rel=\"noopener\"><code>rate_limit<\/code> function<\/a> for use with controllers. To take advantage of this new feature, we implemented code insight for rate limiting, including code highlighting and completion.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Code insight for browser guards<\/h3>\n\n\n\n<p>Another feature coming in RubyMine 2024.2 is code insight for the <a href=\"https:\/\/github.com\/rails\/rails\/pull\/50505\" target=\"_blank\" rel=\"noopener\">browser guard<\/a> method. We added highlighting for the <code>allow_browser<\/code> function, as well as completion for browser names and <code>only<\/code> arguments.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Stimulus<\/h2>\n\n\n\n<p>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 <code>stimulus-rails<\/code> gem is shipped by default with Rails starting from version 7.<\/p>\n\n\n\n<p>RubyMine offers a range of features to facilitate working with Stimulus, including code completion, navigation, and rename refactorings.<\/p>\n\n\n\n<p>Keep an eye out for upcoming blog posts that will guide you how to effectively use Stimulus in RubyMine.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Other features<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">Completion for Ruby-related commands in the new terminal<\/h3>\n\n\n\n<p>The new terminal provides automatic completion for commands, options, subcommands, arguments, and more. In RubyMine 2024.2, we added completion for the following commands: <code>ruby<\/code>, <code>rails<\/code>, <code>rake<\/code>, <code>bundle<\/code>, <code>rbenv<\/code>, <code>irb<\/code>, <code>pry<\/code>, <code>rbs<\/code>, and <code>rspec<\/code>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" loading=\"lazy\" width=\"1360\" height=\"600\" src=\"https:\/\/blog.jetbrains.com\/wp-content\/uploads\/2024\/07\/image.png\" alt=\"\" class=\"wp-image-488789\"\/><\/figure>\n\n\n\n<p>As we continue enhancing completion for CLI commands, certain completion options may not be accessible or may differ from shell-based completion.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Markdown rendering in <em>Reader<\/em> mode and quick documentation<\/h3>\n\n\n\n<p>As Rails 8 uses Markdown documentation instead of RDoc, we implemented Markdown rendering, making it available in <em>Reader<\/em> mode and quick documentation popups. The functionality will work if a file has the <code>:markup: markdown<\/code> directive at the beginning or if there&#8217;s an <code>.rdoc_options<\/code> file in the project root with the line <code>markup: markdown<\/code> in it.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Custom RuboCop configurations<\/h3>\n\n\n\n<p>In this release, we introduced a new option to select a custom configuration file for RuboCop, available in <em>Settings | Tools | RuboCop<\/em>. RubyMine passes the path to your configuration file as a RuboCop command argument with the <code>--config<\/code> option, which ensures it works even when a remote SDK is used.<\/p>\n\n\n\n<p>If you don\u2019t specify any file, RubyMine will use either <code>.rubocop.yaml<\/code> or the default settings if the former is not found in your project.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Formatter settings<\/h3>\n\n\n\n<p>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 <em>Settings | Editor | Code Style | Ruby | Spaces | Within array literals<\/em>.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Join the Early Access Program<\/h2>\n\n\n\n<p>You can download the latest EAP build <a href=\"https:\/\/www.jetbrains.com\/ruby\/nextversion\/\" target=\"_blank\" rel=\"noopener\">from our website<\/a> or via the <a href=\"https:\/\/www.jetbrains.com\/toolbox-app\/\" target=\"_blank\" rel=\"noopener\">Toolbox App<\/a>. The full list of closed tickets for this EAP build is available in the <a href=\"https:\/\/youtrack.jetbrains.com\/articles\/RUBY-A-220365168\/RubyMine-2024.2\" target=\"_blank\" rel=\"noopener\">release notes<\/a>.&nbsp;<\/p>\n\n\n\n<p>We encourage you to share your thoughts in the comments below and to create and vote for new feature requests in the <a href=\"https:\/\/youtrack.jetbrains.com\/issues\/ruby\" target=\"_blank\" rel=\"noopener\">issue tracker<\/a>.<\/p>\n\n\n\n<p><em>Happy developing!<\/em><\/p>\n\n\n\n<p><em>The RubyMine team<\/em><\/p>\n","protected":false},"author":1310,"featured_media":488801,"comment_status":"closed","ping_status":"closed","template":"","categories":[826,4156],"tags":[8486,8494,1848,8636,8514,8067],"cross-post-tag":[],"acf":[],"_links":{"self":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/ruby\/487411"}],"collection":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/ruby"}],"about":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/types\/ruby"}],"author":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/users\/1310"}],"replies":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/comments?post=487411"}],"version-history":[{"count":9,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/ruby\/487411\/revisions"}],"predecessor-version":[{"id":528341,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/ruby\/487411\/revisions\/528341"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/media\/488801"}],"wp:attachment":[{"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/media?parent=487411"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/categories?post=487411"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/tags?post=487411"},{"taxonomy":"cross-post-tag","embeddable":true,"href":"https:\/\/blog.jetbrains.com\/zh-hans\/wp-json\/wp\/v2\/cross-post-tag?post=487411"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}