在Atom中运行Ruby程序

hea*_*irs 7 ruby atom-editor

我安装了Atom和脚本包,编写了一个Ruby测试程序,将其保存为hello.rb,按下ctrl+ shift+ b执行,并得到错误消息'ruby' is not recognized as an internal or external command, operable program or batch file.我认为脚本包中包含Ruby和多个其他语法.在我运行程序之前还需要做些什么吗?

小智 6

我没有从Atom运行我的代码,但我认为问题的一个可能原因是没有在您的机器上安装Ruby本身.Mac已经从工厂安装了Ruby,但Windows机器通常没有.

查看http://rubyinstaller.org/.它是在Windows环境中安装Ruby的简单工具.