Rubymine找不到BUNDLE_PATH指定的宝石 [英] Rubymine Not Locating Gems Specified by BUNDLE_PATH

查看:165
本文介绍了Rubymine找不到BUNDLE_PATH指定的宝石的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将RubyMine IDE与RVM一起用于Ruby版本管理和

I am using RubyMine IDE with RVM for Ruby version management and

bundler install --path vendor/bundle

将我的宝石保存在本地。但是,RubyMine似乎没有读取我的.bundle / config文件,该文件使用BUNDLE_PATH属性指定我的宝石所在的位置:

to keep my gems local. However, RubyMine doesn't seem to be reading my .bundle/config file which specifies where my gems are located with the BUNDLE_PATH property:

BUNDLE_PATH: vendor/bundle
BUNDLE_DISABLE_SHARED_GEMS: '1'

我找到了一些资料表示RubyMine应该支持此功能,但似乎找不到确切的解释或工作原理。

I have found some sources which indicate that RubyMine should support this, but can't seem to find any explanation of exactly how it works or how to fix it properly.

该线程似乎表明RubyMine应该选择bundler / config

This thread seems to indicate that RubyMine should pick up the bundler/config

,如果您将bundler配置为默认在供应商/捆绑包中安装gem,则RM应该可以解决这个问题(如果那不是一个错误)。 http://devnet.jetbrains.com/thread/441239

"if you configured bundler to install gems in vendor/bundle by-default then RM is supposed to handle this (and if it is not then this is a bug)." http://devnet.jetbrains.com/thread/441239

还有一些RubyMine错误表明它无法正常工作:

Here's a few more RubyMine bugs indicating it is not working:

  • http://youtrack.jetbrains.com/issue/RUBY-9898
  • http://youtrack.jetbrains.com/issue/RUBY-12913
  • http://youtrack.jetbrains.com/issue/RUBY-13988
  • http://youtrack.jetbrains.com/issue/RUBY-12340
  • http://youtrack.jetbrains.com/issue/RUBY-12444
  • http://youtrack.jetbrains.com/issue/RUBY-14542 - I created this one to get their attention since most of the others were closed or have gone cold.

我还看到了一个stackoverflow线程,使用RVM Gemsets和邦德勒RubyMine ,有人抱怨同样的问题,但是解决方案只是通过执行以下操作在RVM托管路径下安装gem:

I also saw a stackoverflow thread, Using RVM Gemsets & Bundler & RubyMine, where someone complained about the same problem, but the solution was simply to install the gems under the RVM managed path by doing the following:

bundle install --system

嗯,这违背了保持您的目的项目之间隔离的宝石。我知道有一些宝石集,但是我更不想使用它们。

Well, this defeats the purpose of keeping your gems isolated between projects. I know there are gemsets for this, but I much prefer not to use them.

当我尝试从RubyMine运行项目时,我看到的错误如下:

The error I am seeing is the following when I try to run my project from RubyMine:

运行开发时出错:[在SDK中找不到Rails]

另一个症状是在项目视图的外部库下看不到我安装在vendor / bundle下的gem,只有我的Ruby SDK和bundler安装在这里。

The other symptom is that my gems installed under vendor/bundle aren't visible under the "External Libraries" in the project view, only my Ruby SDK and bundler are installed here.

同样,这可以正常工作并从命令行启动我的服务器:
bundle exec rails server

Also, this works and starts my server find from the command line: bundle exec rails server

但是,即使我尝试使用运行捆绑包(捆绑包exec)上下文中的脚本,它仍然会失败。

But even when I try to run my server with "Run the script in the context of the bundle (bundle exec)", it still fails.

推荐答案

实际上是从控制台通过捆绑包运行ruby mine

Actually running ruby mine from console through bundle helps!

$ bundle exec rubymine

祝你好运!

这篇关于Rubymine找不到BUNDLE_PATH指定的宝石的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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