运行名为“未指定 SDK”的 Ruby 代码时出错

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/15183380/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-06 05:47:53  来源:igfitidea点击:

Error On Running Ruby Code named "No SDKs Specified"

rubyrubymine

提问by osimer pothe

I have downloaded RubyMine IDE to run ruby code . I have written the following code:

我已经下载了 RubyMine IDE 来运行 ruby​​ 代码。我编写了以下代码:

puts 'hellow world'

But I have a error when I want to run this smallest program . The IDE shows the following error .

但是当我想运行这个最小的程序时出现错误。IDE 显示以下错误。

"No SDKs specified"

Why ? What to do if I want to solve this problem ? I am a beginner in this language . Can you guys help me in this regard ? Also I want your suggestion . Is "RubyMine" best IDE for Ruby ? What IDE is used by you ?

为什么 ?如果我想解决这个问题该怎么办?我是这门语言的初学者。你们能在这方面帮助我吗?我也想要你的建议。“RubyMine”是 Ruby 的最佳 IDE 吗?你用的是什么IDE?

回答by CrazyCoder

You need to configure the SDK here:

您需要在此处配置 SDK:

Add SDK

添加开发工具包

Use the Add SDK...button and specify the path to the ruby executable on your system.

使用该Add SDK...按钮并指定系统上 ruby​​ 可执行文件的路径。

On Windows you should install Ruby using http://rubyinstaller.org/binary release. Not the source package.

在 Windows 上,您应该使用http://rubyinstaller.org/二进制版本安装 Ruby 。不是源码包。



Questions like what is the bestor your favoriteare not welcome on this site, refer to the FAQ.

这样的问题what is the bestyour favorite不欢迎在这个网站上,请参考FAQ

回答by Biplob45

When you create a new project, you just need to configure the SDK also for run your project screenshot

当你创建一个新项目时,你只需要配置 SDK 来运行你的项目 截屏

回答by LEXX

I fixed it like this (Idea 2019 Ultimate):

我是这样修复的(Idea 2019 Ultimate):

  • File | Project structure | Modules
  • select radio button on "Ruby SDK and Gems"
  • Apply
  • 档案 | 项目结构 | 模块
  • 选择“Ruby SDK 和 Gems”上的单选按钮
  • 申请