We have a git repository with a custom gem. To install it Gemfile has a line:
gem 'my-gem', :git => '[email protected]:my-gem.git'
After installing the gem, it is not shown in RubyMine`s External Libraries.
How to make the gem be shown in External Libraries and code from the gem be autocompleted?
We get this error as well, so it's probably a bug in RubyMine. A workaround is to check out that gem repo and tell bundler to use it. Note that the remote repository will not be used anymore.
bundle config local.my-gem /path/to/my-gem/
bundle install
Then open my-gem by adding it to your existing window in rubymine as explained here. This made forward navigation and code completion work for us.
A bug relating to detecting gems installed from git with bundler was fixed in RubyMine 2017.1. That bug referenced the bundler method git_source
, but duplicates of that bug did not reference that method, so it seems to have been a general problem with recognizing gems installed from git with bundler. So upgrade to 2017.1 or later for such gems to be recognized more often than in previous versions.
In the most recent version available, 2017.2 EAP 5, there is still a bug in recognizing gems installed from git by bundler on the command line. If you've done that and the gem doesn't appear in External Libraries etc., you can do any of the following:
bundle install
from inside RubyMine (Tools → Bundler → Install)If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With