当我尝试设置 Devkit 路径时,我最终得到以下错误
C:\Devkit>ruby dk.rb install
Invalid configuration or no Rubies listed. Please fix 'config.yml'
and rerun 'ruby dk.rb install'
我无法解决此错误。有人能帮助我吗?
这是我的config.yml文件。
# This configuration file contains the absolute path locations of all
# installed Rubies to be enhanced to work with the DevKit. This config
# file is generated by the 'ruby dk.rb init' step and may be modified
# before running the 'ruby dk.rb install' step. To include any installed
# Rubies that were not automagically discovered, simply add a line below
# the triple hyphens with the absolute path to the Ruby root directory.
#
# Example:
#
# ---
# - C:/ruby19trunk
# - C:/ruby192dev
#
---
答案 0 :(得分:36)
您的config.yml文件是YAML文件。您需要使用示例:
定义Ruby环境的路径# --- # - C:/ruby19trunk # - C:/ruby192dev
该示例已被注释掉,因此它在您的计算机上没有做任何事情。在“真正的”YAML中你会使用类似的东西:
---
- C:/ruby19trunk
- C:/ruby192dev
它将为您的环境定义一组路径或目录。您需要确定适当路径的位置,然后将其填入。
我强烈建议您阅读the YAML documentation,以便了解自己在做什么。更重要的是,YAML是最常用的数据序列化格式之一,你会遇到很多。