Why need DevKit
When I tried to setup my debug environment for Ruby. I have to get gem package debug_base and debug_ide from repository. ‘gem install xxx’ command will download packages and using DevKit to compile the package. I was thinking why weren’t these gem package compiled in advance? So we don’t need DevKit to do build job when installing them. Is there any other purpose for DevKit ?
asked Nov 6, 2014 at 8:47
11.5k 26 26 gold badges 105 105 silver badges 180 180 bronze badges
1 Answer 1
Some packages/gems need to be compiled in advance to work because they use native extensions.
This is done automatically by ruby gem when you use the gem command.
The RubyInstaller Development Kit is a toolkit that makes it easy to build and use native C/C++ extensions such as RDiscount and RedCloth for Ruby on Windows
Add-ons
Sometimes you just want RubyGems to build that cool native, C-based extension without squawking. Who’s your buddy? The DevKit that’s who!
MSYS2-DevKit (only Ruby >= 2.4)
Stating with RubyInstaller-2.4 we’re no longer using our own DevKit compilation, but make use of MSYS2 for both building Ruby itself as well as building Ruby gems with C-extensions. It can be installed through the ridk install command, which is part of RubyInstaller-2.4. Alternatively a manual download and installation from MSYS2 is also possible.
Dedicated DevKit (only Ruby < 2.4)
The RubyInstaller Development Kit is a toolkit that makes it easy to build and use native C/C++ extensions such as RDiscount and Nokogiri for Ruby on Windows. It is built on MSYS1, which is no longer maintained now. So you should upgrade to RubyInstaller-2.4 which makes use of MSYS2.
Simply download, double-click, choose an installation directory and run the Ruby install helper script and you’re ready to start using native Ruby extensions. For installation details check out the Development Kit wiki page.
Run Jekyll on Windows
A step-by-step guide to setting up Jekyll on Windows by @juthilo.
Install Ruby and the Ruby DevKit
Ruby is the programming language that Jekyll is written in. You’ll need to install Ruby and the corresponding DevKit, which is needed to build some of Jekyll’s dependencies as “native extensions”.
Install Ruby
First, click on the button below and download the installer for Ruby v2.0.0 that matches your system’s architecture (x86 / x64).
Execute the installer and go through the steps of the installation. When you get to the screen below, make sure to check the “Add Ruby executables to your PATH” box.

Click Install and Ruby will be installed within seconds.
Install the Ruby DevKit
Jekyll has some dependencies which, out of the box, only provide raw source code. To make them into fully functional executables, you’ll probably need to install the Development Kit.
Click the button below and download the DevKit archive that corresponds to your Ruby installation and system architecture. For Ruby v2.0.0, the file name will begin with DevKit-mingw64 . Choose the 32bits or 64bits version depending on your system.
The download is a self-extracting archive. When you execute the file, it’ll ask you for a destination for the files. Enter a path that has no spaces in it. We recommend something simple, like C:\RubyDevKit\ . Click Extract and wait until the process is finished.
Next, you need to initialize the DevKit and bind it to your Ruby installation. Open your favorite command line tool and navigate to the folder you extracted the DevKit into.
cd C:\RubyDevKit
Auto-detect Ruby installations and add them to a configuration file for the next step.
ruby dk.rb init
Install the DevKit, binding it to your Ruby installation.
ruby dk.rb install
Summary
That’s it! If all went well, you now have a working Ruby installation on your machine and you can build fully functional executables using the Ruby Development Kit. Ruby includes a way to install so-called gems—software packages that you can use from the command line. Jekyll is one of them! Click the button below to find out how you can successfully install it.
Copyright © 2015 Julian Thilo, licensed under CC-BY-3.0.
Дополнения

Иногда нужны просто Ruby-гемы, чтобы создать крутое нативное дополнение на C без заморочек. Кто твой друг? DevKit — вот кто!
MSYS2-DevKit (только для Ruby >= 2.4)
С версии RubyInstaller 2.4, вместо нашей собственной сборки DevKit, мы используем MSYS2 для компиляции как самого Ruby, так и гемов с расширением C. Его можно установить с помощью команды ridk install , которую добавляет сам RubyInstaller 2.4. Альтернативный вариант — загрузить и установить MSYS2 вручную.
Специализированный DevKit (только для Ruby < 2.4)
RubyInstaller Development Kit — это набор инструментов, с которым легко создавать и использовать нативные C/C++ дополнения — как, например, RDiscount или Nokogiri — на Windows. DevKit основан на MSYS1, который уже не поддерживается. Чтобы работать с MSYS2, обновитесь до RubyInstaller 2.4.
Просто скачайте, кликните дважды по файлу, выберите папку для установки, запустите помощника и всё. Теперь вы можете использовать родные Ruby-библиотеки. Подробности о том, как устанавливать DevKit, смотрите на вики-странице.
