首页 > 解决方案 > 为什么我的终端一直给我这个错误?

问题描述

当我运行我的代码时,我得到了这个错误,或者即使我运行clean我也得到了那个错误,clean而不是ruby在开始时。我已经在我的 Windows 上安装了 Ubuntu 18.04 子系统。而且我还安装了 WSL 遥控器。我在VS CODE中遇到了这个问题。我刚开始学习软件工程,所以如果我没有提供关于我的问题的不太清楚的信息,我很抱歉。希望有人会提供帮助。

ruby : The term 'ruby' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify th 
    at the path is correct and try again.
    At line:1 char:1
    + ruby 01.corprime.rb
    + ~~~~
        + CategoryInfo          : ObjectNotFound: (ruby:String) [], CommandNotFoundException

在 VS 代码中。

标签: ruby-on-railsruby

解决方案


clean 和 ruby​​ 默认情况下是工具。如果 msg 说无法识别,则 VS 没有运行此命令或工具的路径尝试 clear 而不是 clean for ruby​​ 尝试安装它并将其添加到路径或指定路径时在 VS 代码中使用


推荐阅读