RubyMine不能识别来自git仓库的gem [英] RubyMine doesn't recognize gem from git repository

查看:211
本文介绍了RubyMine不能识别来自git仓库的gem的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个自定义gem的git仓库。
安装它Gemfile有一行:

$ p $ gem'my-gem',:git => 'git@192.168.1.100:my-gem.git'

安装完宝石之后,它不是显示在RubyMine的外部库中。



如何使gem在外部库中显示并且gem中的代码被自动完成?

解决方案

我们也得到这个错误,所以它可能是RubyMine中的一个错误。解决方法是检查该宝石回购,并告诉捆绑使用它。请注意,远程存储库不会再被使用。

  bundle config local.my-gem / path / to / my-gem / 
bundle install

然后打开my-gem,将它添加到您的现有窗口中的rubymine作为此处解释。这为我们提供了导航和代码完成工作。


We have a git repository with a custom gem. To install it Gemfile has a line:

gem 'my-gem', :git => 'git@192.168.1.100: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.

这篇关于RubyMine不能识别来自git仓库的gem的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆