Подтвердить что ты не робот

Не удается автоматически создать файл конфигурации Ruby DevKit

Я установил Ruby 2.0 с установщиком Windows Ruby, Unpacked DevKit (DevKit-mingw64-64-4.7.2-20130242432-sfx.exe) в Program Files и запустил

ruby dk.rb init

но сгенерированный файл 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
#
---

Как сделать dk.rb для генерации достоверных config.yml?

4b9b3361

Ответ 1

Похоже, проблема в том, что 64-битная версия Ruby 2.0.0 создает запись реестра в местоположении, о котором неизвестно devkit script (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'
]

Ответ 2

Ruby on rails devkit windows

Черта перед абсолютным путем в config.yml была всем, что мне нужно.

- C:/Ruby....

Кроме того, Ruby и Devkit намеренно расположены в корне моего диска C, чтобы избежать проблемы с пробелами в папке "Program Files".

Ответ 3

Отредактируйте файл 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
#
---