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

Pau*_*aul 48 ruby devkit

我已经将Ruby 2.0与Windows Ruby安装程序,Unpacked DevKit(DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe)一起安装到Program Files并运行

ruby dk.rb init
Run Code Online (Sandbox Code Playgroud)

但生成的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
#
---
Run Code Online (Sandbox Code Playgroud)

如何让dk.rb生成有效config.yml

Dr.*_*uss 95

看来问题是,红宝石2.0.0的64位版本中创建了的devkit initilisation脚本(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'
]
Run Code Online (Sandbox Code Playgroud)

  • 经过近3年的时间,这个问题和答案仍然得到了重点......难道修复这个小错误真的很难吗? (5认同)
  • 更新dk.rb后​​,请确保通过`ruby dk.rb init`重新生成config.xml (3认同)

rac*_*mic 28

Ruby on rails devkit windows

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

- C:/Ruby....
Run Code Online (Sandbox Code Playgroud)

另外,Ruby和Devkit都故意位于我的C驱动器的根目录中,以避免"Program Files"文件夹中的空格问题.

  • 问题不在于如何手动编辑`config.yml`,而是如何使它自动生成**有效的`config.yml`. (3认同)