48

I've installed Ruby 2.0 with a Windows Ruby Installer, Unpacked DevKit (DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe) to Program Files and ran

ruby dk.rb init

but the generated config.yml file doesn't list my Ruby path. Its contents looks as follows:

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

How to make dk.rb to generate valid config.yml?

4

3 回答 3

95

问题似乎在于 Ruby 2.0.0 的 64 位版本在 Devkit 初始化脚本 (dk.rb) 不知道的位置 ('Software\Wow6432Node\RubyInstaller\MRI') 中创建了一个注册表项。

在更新 Devkit 安装程序之前,您可以通过在文本编辑器中打开 %DevKitExtractionDir%\dk.rb 并更改 REG_KEYS 数组以包含 64 位注册表路径来进行安装,因此它看起来像这样:

REG_KEYS = [
    'Software\RubyInstaller\MRI',
    'Software\RubyInstaller\Rubinius',
    'Software\Wow6432Node\RubyInstaller\MRI'
]
于 2013-06-17T13:40:56.787 回答
28

Ruby on rails devkit windows

我只需要 config.yml 中绝对路径前面的破折号。

- C:/Ruby....

还要提一下,Ruby 和 Devkit 都故意位于我的 C 驱动器的根目录中,以避免“程序文件”文件夹中的空格问题。

于 2013-12-24T17:44:02.513 回答
4

编辑config.yml文件并给你的 Ruby 目录的路径如下

# 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:/ruby21-x64
# - C:/ruby192dev
#
--- 
于 2015-10-07T09:19:57.140 回答