如何配置config.yml以便我可以安装devkit?

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

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

是的我不认为它可能更模糊。 基本上,它要求一个引用你的ruby安装。 我的程序文件目录中存在,因为我更喜欢将所有已安装的东西保存在一个位置,而不是直接在C驱动器上,就像默认情况下(我在Windows上)。 所以,因为我的Ruby安装路径是:C:\ Program Files \ Ruby200-x64

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

 #此配置文件包含所有的绝对路径位置
 #installed要加强的Rubies以使用DevKit。 这个配置
 #file由'ruby dk.rb init'步骤生成,可以修改
 #在运行'ruby dk.rb install'步骤之前。 包括任何已安装的
 #Rubies没有自动发现,只需在下面添加一行
 #具有Ruby根目录的绝对路径的三重连字符。
 #
 #示例:
 #
 #---
 # -  C:/ ruby​​19trunk
 # -  C:/ ruby​​192dev
 #
 ---
 - “C:/ Program Files / Ruby200-x64”

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

我可以看到这对很多人来说很容易让人困惑,所以我希望这会有所帮助。

更新我发现文件路径中的空格会导致问题,因此我将我的命令移回c:\驱动器只是因为我不想处理它。 我建议远离文件路径中的空格,除非您愿意排除问题。

所以……那个文件要求你指出你的ruby安装。

对我来说……我看起来像:

 - C:\RailsInstaller\Ruby2.0.0 

写你的路径到ruby安装文件夹模式是三个破折号然后移动到下一行添加另一个破折号,空格和路径

 --- - C:\Ruby21-x64 

(因为你可以在config.yml文件的末尾看到三个破折号,所以你基本上需要添加最后一行)

注意空白! 我的问题是这也许也可能是你的!

你必须在Windows上使用斜杠“/”而不是反斜杠“\”。 在Win7x64上为我工作