Skip to content

Development Kit (legacy)

Modularis1 edited this page Jan 30, 2023 · 8 revisions

Attention

This information is valid only for the legacy DevKit devkit-3.4.5r3-20091110.7z available from the “RubyInstaller Archives”. For more information on the current DevKit, please refer to the Development Kit page.

DevKit Overview

The “RubyInstaller Development Kit” is a “MinGW” and “MSYS” based environment for building native C extensions for your RubyInstaller environment. It is not a general purpose MSys/MinGW installation.

Rather than directing you to the MinGW site and telling you which packages to install, we’ve bundled the required pieces into a single archive so that you can conveniently enable your RubyInstaller installation to build many native C extensions.

Installation Overview

Installing the DevKit is usually a simple two-step process:

  1. Extract the DevKit contents into your RubyInstaller installation directory
  2. Modify DevKit’s <INSTALL_DIR>/devkit/msys/1.0.11/etc/fstab configuration file

Installation – Step 1

To install the Development Kit, you’ll need to have 7-Zip installed.

After you’ve downloaded the DevKit, extract its contents into your RubyInstaller installation directory (C:\Ruby for example). This process results in the key files from DevKit’s bin directory (eg – gcc.bat, make.bat, sh.bat) being extracted into your Ruby installations bin directory and a (potentially partially) configured MSys/MinGW environment. Your RubyInstaller installation directory should now look like:

    |-- bin/
    |-- devkit/
    |-- include/
    |-- lib/
    |-- share/
    `-- INSTALL.txt

Installation – Step 2

If you have Ruby installed somewhere other than the default C:\Ruby directory, you’ll need to change the <INSTALL_DIR>/devkit/msys/1.0.11/etc/fstab file contents to properly point to the right directories for /mingw and /usr/local. This is usually as easy as replacing the C:/Ruby text within the fstab file with the directory location where you’ve installed the RubyInstaller.

For example, if you installed RubyInstaller to D:\ruby19 you would update your D:/ruby19/devkit/msys/1.0.11/etc/fstab to look like:

D:/ruby19/devkit/gcc/3.4.5 /mingw
D:/ruby19/devkit/msys/1.0.11/usr/local /usr/local

The batch files in <INSTALL_DIR>/bin allow GCC, make and sh to be used in the extension compilation process without having to add additional directories into your PATH. MsysGit does the same thing with the “git command-line” option.

You can check if you have your PATH setup by running this command:

D:\ruby19\bin>sh which autoconf
/usr/local/bin/autoconf

it should say /usr/local/bin/autoconf. If it says nothing then your PATH environment variable isn’t setup correctly.

Potential Issues

Simply having the DevKit installed should allow for many native C extensions to build without problems. However, some extensions may require additional header and library files to also be installed, and still other extensions may need additional work done by the authors in order to get them to compile with the MSys/MinGW based DevKit. If you have problems, please drop us a line at our RubyInstaller Google Group

Clone this wiki locally