RubyMine 2017.1 EAP 2: Create gemsets quickly & work with RuboCop
RubyMine 2017.1 EAP 2 (171.2272.16) is out and available for download. Besides a number of bug fixes, this Early Access Program provides a way to create RVM gemsets for Rails applications right from the New Project wizard, and features RuboCop support.
Creating Gemsets From the New Project Wizard
If you haven’t used gemsets before, you might want to know that a gemset is a container used to keep separate gems for each project. Gemsets allow you to change gems and their versions in one project without being afraid of affecting your other projects. Jump to the RVM documentation to learn how gemsets can improve your coding experience.
To create a gemset for your new Rails project in RubyMine, follow these steps:
Open RubyMine and click Create New Project from the Welcome screen (File | New Project). Choose a new Rails application.
As you can see in the GIF above, when you specify a name for your project, RubyMine automatically suggests a similarly named gemset. Click Create to have the IDE install a gemset for your new project. Leave the box checked so that the gems are put in this gemset when generating your Rails project.
Since you don’t have Rails set up in your newly created gemset, you can install any available version in the Rails Version field (this might take up to several minutes):
After installing Rails, click Create in the lower right corner of the New Project wizard. The IDE will generate your Rails application with all the gems mounted in the preconfigured gemset. The IDE will also create
.ruby-version files, specifying the gemset and the Ruby version used in the project.
Go to Preferences | Languages & Frameworks | Ruby SDK and Gems to see your SDK configurations and available gems:
Note that you may face issues when creating a gemset for a New Rails API. This problem will be fixed in the next stable release (v2017.1).
Now the IDE interacts with RuboCop, analyzing code in the background and displaying errors according to the RuboCop’s severity table:
RuboCop inspections are treated the same way as other code inspections:
If the project SDK has the rubocop gem installed, the RuboCop inspection will be enabled by default. Otherwise, RubyMine will suggest to install the missing gem and enable the inspection:
Here are some other improvements for this EAP:
- The inspection of frozen strings modification has been fixed and now doesn’t show false warnings.
- Underscores in the middle of the words now respect CamelHumps settings correctly in markdown files.
- The ability to change language level for JRuby and Rubinius, which had previously been removed, has been reinstated.
Follow this link for the full list of changes.
Your RubyMine Team
Subscribe to Blog updates
RubyMine 2024.1 Early Access Program is Open!
The RubyMine 2024.1 Early Access Program has now started! In this blog post, we’ll share our plans for the upcoming release and the areas we’re currently focusing on. The first EAP build includes performance and usability improvements, bug fixes, and updates to RBS language support.Now, you c…
RubyMine 2023.3 EAP Update
Hello everyone! We’re back with an update on the state of the 2023.3 Early Access Program. You can download the latest EAP build from our website, via the free Toolbox App, or by using snaps for Ubuntu. Here are the biggest highlights of this release: Performance improvements As we me…
The RubyMine 2023.3 Early Access Program Is Open!
Hello everyone, The third RubyMine Early Access Program of 2023 is underway! The key change in the first EAP build is an important indexing optimization. By refactoring our code base, we’ve doubled RubyMine’s indexing speed compared to v2023.1. This is particularly noticeable when working…
Performance Improvements in RubyMine 2023.1
Hello everybody, The new release is fast approaching, so it’s time to unveil the performance enhancements you can expect from RubyMine 2023.1. Faster code completion When developing and supporting RubyMine, we analyze a great load of anonymized usage data. A lot of recent data pointed to the fact t…