无法正确地自动生成Ruby DevKitconfiguration文件

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

ruby dk.rb init 

但生成的config.yml文件不会列出我的Rubypath。 其内容如下所示:

 # 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')中创buildregistry项。

在Devkit安装程序更新之前,可以通过在文本编辑器中打开%DevKitExtractionDir%\ dk.rb并更改REG_KEYS数组以包含64位registrypath来使安装工作,所以它看起来像这样:

 REG_KEYS = [ 'Software\RubyInstaller\MRI', 'Software\RubyInstaller\Rubinius', 'Software\Wow6432Node\RubyInstaller\MRI' ] 

Ruby on Rails的开发工具包窗口

在config.yml绝对path前面的短划线是我所需要的。

 - C:/Ruby.... 

此外,Ruby和Devkit都故意位于我的C驱动器的根目录,以避免与'程序文件'文件夹中的空白问题。

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

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