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>
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 :(得分:24)
是的,我不认为它可能更模糊。基本上,它要求一个引用你的ruby安装。我的程序文件目录中存在,因为我更喜欢将所有已安装的东西保存在一个位置,而不是直接在C驱动器上,就像默认情况下(我在Windows上)。 所以,因为我的Ruby安装路径是: C:\ Program Files \ Ruby200-x64
我的整个 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 # --- - "C:/Program Files/Ruby200-x64"
注意,我将Ruby文件路径放在引号中,因为它包含空格。如果您的路径不包含空格,那么您将不需要它。
我可以看到这对很多人来说非常混乱,所以我希望这会有所帮助。
<强>更新强> 我发现文件路径中的空格会导致问题,所以我将我的命令移回c:\驱动器只是因为我不想处理它。我建议远离文件路径中的空格,除非您愿意排除问题。
答案 1 :(得分:13)
所以......那个文件要求你指出你的ruby安装。
对我来说......我看起来像:
- C:\RailsInstaller\Ruby2.0.0
答案 2 :(得分:8)
将您的路径写入ruby安装文件夹 模式是三个破折号然后移动到下一行 添加另一个短划线,空格和路径
---
- C:\Ruby21-x64
(因为你可以看到三个破折号已被放入 你的config.yml文件的结尾,所以你基本上需要添加最后一行)
答案 3 :(得分:2)
注意空白!我的问题是这也许也属于你!
答案 4 :(得分:2)
你必须在Windows上使用斜杠“/”而不是反斜杠“\”。 在Win7x64上为我工作