无法在RubyMine中解析文件

Gor*_*Gao 9 ruby-on-rails rubymine twitter-bootstrap

我正在尝试将RubyMine(v6.3.3)用于我的rails项目.bootstrap-sass根据https://github.com/twbs/bootstrap-sass中的说明添加gem 后,RubyMine会抱怨我在application.js文件中添加的行.但是,该文件实际上在项目的外部库的范围内.

项目本身按预期工作,只是这个RubyMine警告让我恼火.

我错过了配置中的任何步骤吗?

在此输入图像描述

Gor*_*Gao 11

它被确认为RubyMine问题.

bootstrap-sassgem已添加assets到资产路径,这就是项目工作的原因.https://github.com/twbs/bootstrap-sass/blob/master/lib/bootstrap-sass/engine.rb#L6

但是,RubyMine似乎忽略该Rails.application.config.asset.paths设置并仅检查默认资产路径.这就是出现红色波浪下划线的原因.

以下是RubyMine的未解决问题:http://youtrack.jetbrains.com/issue/RUBY-15585

解决方法是在本地gem安装中创建符号链接(供应商/资产 - >资产).它将关闭RubyMine.

2.1.0/gems/bootstrap-sass-3.2.0.0% ls -l vendor
total 8
lrwxr-xr-x  1 gogao  staff  9 Aug  7 11:28 assets -> ../assets
Run Code Online (Sandbox Code Playgroud)

更多细节可以在GitHub问题中找到https://github.com/twbs/bootstrap-sass/issues/684 (谢谢你,@ Ri4a)