如何配置 config.yml 以便我可以安装 devkit? [英] How do I configure config.yml so that I can install devkit?

查看:43
本文介绍了如何配置 config.yml 以便我可以安装 devkit?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Microsoft Windows [版本 6.1.7601]版权所有 (c) 2009 Microsoft Corporation.版权所有.C:\Users\Aaron>cd/DevKit该系统找不到指定的路径.C:\Users\Aaron>cd \DevKitC:\DevKit>ruby dk.rb init初始化完成!请检查并修改自动生成的'config.yml' 文件以确保它包含所有的根目录您希望通过 DevKit 增强的已安装 Ruby 的数量.C:\DevKit>ruby dk.rb install --force配置无效或未列出红宝石.请修复'config.yml'并重新运行ruby dk.rb install"C:\DevKit>

config.yml 如下所示:

#这个配置文件包含了所有的绝对路径位置# 安装了 Ruby 以进行增强以与 DevKit 配合使用.这个配置# 文件由ruby dk.rb init"步骤生成,可以修改# 在运行ruby dk.rb install"步骤之前.包括任何已安装的# 不是自动发现的红宝石,只需在下面添加一行# 带有 Ruby 根目录绝对路径的三连字符.## 例子:## ---# - C:/ruby19trunk# - C:/ruby192dev#---

我完全被难住了,我不知道该怎么办.有人能告诉我如何解决这个问题吗?

解决方案

是的,我不认为它可能更模糊.基本上,它要求提供一份对您的 ruby​​ 安装的参考.我的位于我的 Program Files 目录中,因为我更喜欢将所有安装的东西放在一个地方,而不是像默认的那样直接放在 C 驱动器上(我在 Windows 上).所以,由于我的 Ruby 安装路径是:C:\Program Files\Ruby200-x64

我的整个 config.yml 文件如下:

<前># 这个配置文件包含了所有的绝对路径位置# 安装了 Ruby 以进行增强以与 DevKit 配合使用.这个配置# 文件由ruby dk.rb init"步骤生成,可以修改# 在运行ruby dk.rb install"步骤之前.包括任何已安装的# 不是自动发现的红宝石,只需在下面添加一行# 带有 Ruby 根目录绝对路径的三连字符.## 例子:## ---# - C:/ruby19trunk# - C:/ruby192dev#---- "C:/程序文件/Ruby200-x64"

注意,我将我的 Ruby 文件路径放在引号中,因为它包含一个空格.如果您的路径不包含空格,那么您将不需要它.

我可以看到这让很多人感到非常困惑,所以我希望这会有所帮助.

更新我看到文件路径中的空格会导致问题,所以我将我的移动回 c:\ 驱动器只是因为我不想处理它.除非您愿意排查问题,否则我建议您不要在文件路径中使用空格.

Microsoft Windows [Version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation.  All rights reserved.

C:\Users\Aaron>cd /DevKit
The system cannot find the path specified.

C:\Users\Aaron>cd \DevKit

C:\DevKit>ruby dk.rb init

Initialization complete! Please review and modify the auto-generated
'config.yml' file to ensure it contains the root directories to all
of the installed Rubies you want enhanced by the DevKit.

C:\DevKit>ruby dk.rb install --force
Invalid configuration or no Rubies listed. Please fix 'config.yml'
and rerun 'ruby dk.rb install'

C:\DevKit>

The config.yml looks like this:

# 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
#
--- 

I am completely stumped I have no clue what to do. Can someone tell me how to resolve this problem?

解决方案

Yeah I don't think it could possibly be more vague. Basically, it's asking for one reference to your ruby installation. Mine lives in my Program Files directory since I prefer to keep all installed stuff in one spot, rather than straight on the C drive like is default (I'm on windows). So, since my Ruby installation path is: C:\Program Files\Ruby200-x64

My entire config.yml file is the following:

# 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
#
---
- "C:/Program Files/Ruby200-x64"

Note, I put my Ruby filepath in quotes because it contains a space. If your path doesn't contain a space, then you won't need it.

I can see this being colossally confusing for a lot of people, so I hope this helps.

update I'm seeing that spaces in file paths causes issues, so I've moved mine back down to the c:\ drive just because I don't want to deal with it. I recommend staying away from spaces in file paths unless you're willing to troubleshoot issues down the line.

这篇关于如何配置 config.yml 以便我可以安装 devkit?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆