gpt4 book ai didi

ruby - 无法正确自动生成 Ruby DevKit 配置文件

转载 作者:数据小太阳 更新时间:2023-10-29 06:21:34 27 4
gpt4 key购买 nike

我已经使用 Windows Ruby 安装程序安装了 Ruby 2.0,将 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

最佳答案

问题似乎是 64 位版本的 Ruby 2.0.0 在 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'
]

关于ruby - 无法正确自动生成 Ruby DevKit 配置文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16523607/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com