Can't get Ruby DevKit configuration file autogenerated properly

I've installed Ruby 2.0 with a Windows Ruby Installer, Unpacked DevKit (DevKit-mingw64-64-4.7.2-20130224-1432-sfx.exe) to Program Files and ran

ruby dk.rb init

but the generated config.yml file doesn't list my Ruby path. Its contents looks as follows:

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

How to make dk.rb to generate valid config.yml?

Answers


It seems the problem is that that the 64bit version of Ruby 2.0.0 creates a registry entry in a location that the Devkit initilisation script (dk.rb) is not aware of ('Software\Wow6432Node\RubyInstaller\MRI').

Until the Devkit installer is updated, you can get the installation to work by opening %DevKitExtractionDir%\dk.rb in a text editor and changing the REG_KEYS array to include the 64-bit registry path, so it looks like this:

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

Ruby on rails devkit windows

The dash in front of the absolute path in the config.yml was all i needed.

- C:/Ruby....

Also to mention, Ruby and Devkit are both purposely located in the root of my C drive to avoid the issue with white spaces in the 'Program Files' folder.


Edit the config.yml file and give the path of your Ruby directory something as follow

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

Need Your Help

Perl cgi string to float number

perl cgi

This is what I have in my html file