我已经用Windows Ruby安装程序安装了Ruby 2.0,将DevKit(DevKit-mingw64-4.7.2-20130224-1432-sfx.exe(解压缩到程序文件并运行
ruby dk.rb init
但是生成的CCD_ 1文件没有列出我的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 = [
'SoftwareRubyInstallerMRI',
'SoftwareRubyInstallerRubinius',
'SoftwareWow6432NodeRubyInstallerMRI'
]
Ruby on rails devkit windows
config.yml中绝对路径前面的破折号就是我所需要的。
- C:/Ruby....
此外,Ruby和Devkit都特意位于我的C驱动器的根目录中,以避免"程序文件"文件夹中出现空白的问题。
编辑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
#
---