Bundler is the official Gems environment provider in RubyMine
There’s been one quite major change in RubyMine 3.2 that was not really advertised — gems management changes.
We decided to remove a part of our own code in favor of using Bundler. Because Bundler is really the best way to manage the dependencies. So, why re-invent the wheel?
You still have the full UI for browsing gem repositories, installing and updating gems from inside the IDE. The main change is that you no longer attach gems to your projects as you did before.
If you are already using Bundler for managing your gems, RubyMine will figure it out automatically and load the gem requirements from the Gemfile.
If there is no Bundler, RubyMine scans all the project files for calls to Ruby gems and produces a set of the required gems. If for some reason you are not happy with the set of gems defined by RubyMine, you can create a Gemfile yourself and specify the gems of your choice. Just launch Tools | Bundler | Init from the main menu and you’ll have a Gemfile to start with.
It is fun to edit Gemfile in RubyMine
Also, once you open a Gemfile you can see what gems are missing or need to be updated:
and you can install them right from here using the quick-fix (Alt-Enter)
And that’s basically it.
Do you wonder why you need to bother at all? Pretty simple — if RubyMine sees all gems that you use in your code, you can navigate to the gem code, see the docs for gem methods, and of course have accurate code completion. And the reason why RubyMine does not index all of the gems that you have installed, regardless of whether you use them or not, is very simple: performance.
Develop with pleasure!
The RubyMine Team
Subscribe to Blog updates
Thanks, we've got you!
RubyMine 2020.3.4 and 2021.1.1 introduce the concept of trusted projects. It is designed to reduce the risks associated with opening projects from unknown or untrusted sources. Check out this blog post to learn more. As you might already know, when you open a project, RubyMine runs various tools lik…
RubyMine Navigation: Recent Locations PopupEarly Access Program
RubyMine 2019.1 is filled with features and options to help you navigate around your projects quickly without a mouse or touchpad. For example, you can quickly switch between tool windows, go to classes or actions, and open recently edited files. In our Navigate in RubyMine Like a Pro blog post, we …
How to work with Docker/Docker Compose from RubyMineEarly Access Program
To get the most recent information about Docker support in RubyMine, refer to our documentation: Tutorial: Docker Compose as a remote interpreter Tutorial: Docker as a remote interpreter RubyMine 2019.1 has a bunch of capabilities which allow you to work with Docker and Docker Compose. You can i…
Profile Ruby & Rails Apps With rbspy in RubyMineEarly Access Program
RubyMine 2019.1 adds support for rbspy – a great sampling profiler for Ruby (many thanks to @jvns!). This post will help you start profiling your Ruby/Rails apps with RubyMine in 5 minutes. Here are the exact steps: Identify the scenario to be analyzed Create a profiler configuration Run…