无法正确地自动生成Rubydevkit配置文件怎么办?

内容来源于 Stack Overflow,并遵循CC BY-SA 3.0许可协议进行翻译与使用

  • 回答 (2)
  • 关注 (0)
  • 查看 (12)

我已经安装了Ruby 2.0的Windows Ruby Installer,解压缩DevKit(DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe)到Program Files并运行

ruby dk.rb init

但生成的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:/ruby19trunk
# - C:/ruby192dev
#
---

如何使dk.rb生成有效的config.yml

提问于
用户回答回答于

看来问题在于,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'
]
用户回答回答于

扫码关注云+社区