Cannot automatically create Ruby DevKit configuration file

I installed Ruby 2.0 with the Windows Ruby installer, Unpacked DevKit (DevKit-mingw64-64-4.7.2-20130242432-sfx.exe) in Program Files and ran

ruby dk.rb init 

but the generated config.yml file config.yml not display my Ruby path. Its contents are 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 ?

+46
ruby devkit
May 13 '13 at 13:42
source share
3 answers

It seems that the problem is that the 64-bit version of Ruby 2.0.0 creates a registry entry in a location unknown to the devkit script (dk.rb) ('Software \ Wow6432Node \ RubyInstaller \ MRI ").

Until the Devkit installer is updated, you can make this installation 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' ] 
+90
Jun 17 '13 at 13:40
source share

Ruby on rails devkit windows

The line before the absolute path in config.yml was all I needed.

 - C:/Ruby.... 

In addition, Ruby and Devkit are intentionally located at the root of my C drive to avoid problems with spaces in the Program Files folder.

+27
Dec 24 '13 at 17:44
source share

Edit the config.yml file and specify the path to your Ruby directory 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:/ruby21-x64 # - C:/ruby192dev # --- 
+4
Oct 07 '15 at 9:19
source share



All Articles