简体   繁体   English

如何为IntelliJ IDEA的Ruby插件设置SDK?

[英]How do you set the SDK for IntelliJ IDEA's Ruby plugin?

Using IntelliJ Idea 15.0.6 with the Ruby plugin v.8.0.0.20160205 使用IntelliJ Idea 15.0.6和Ruby插件v.8.0.0.20160205

After encountering various Ruby SDK problems, I followed these instructions to re-configure my inherited Ruby project: https://www.jetbrains.com/help/idea/2016.1/configuring-global-project-and-module-sdks.html 在遇到各种Ruby SDK问题后,我按照这些说明重新配置了我继承的Ruby项目: https//www.jetbrains.com/help/idea/2016.1/configuring-global-project-and-module-sdks.html

I now have a global SDK: 我现在有一个全局SDK: 在此输入图像描述

And a project SDK: 一个项目SDK: 在此输入图像描述

And a module SDK (inherited from the project SDK) 和模块SDK(继承自项目SDK) 在此输入图像描述

But gemfiles showed a bunch of inspection problems 但是,gemfiles显示出一堆检查问题 在此输入图像描述

And I was not able to create a Run/Debug Configuration using the module SDK. 我无法使用模块SDK创建运行/调试配置。 Specifically, if I selected the "Choose SDK from module" radio button for Ruby SDK when creating a new Run/Debug Configuration, I would see the error "No SDK specified" at the bottom of the window. 具体来说,如果我在创建新的运行/调试配置时为Ruby SDK选择了“从模块中选择SDK”单选按钮,我会在窗口底部看到错误“未指定SDK”。

What is going on? 到底是怎么回事?

Turns out that the module was not a Ruby module. 事实证明该模块不是Ruby模块。 This is what it should look like: 它应该是这样的:

在此输入图像描述

I deleted the module and recreated it and everything is working correctly. 我删除了模块并重新创建它,一切正常。 Many times I've found that the process of writing out a question is a great way to answer it myself. 很多时候我发现写出问题的过程是我自己回答这个问题的好方法。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM