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