Building Ruby Gem Native Extensions on Windows

If you're using Ruby on Windows, but always encountering gems that require native extensions, then the new(ish) RubyInstaller project is for you.

When browsing the Ruby download page, you may have noticed the newfangled Windows installer for download. They've swapped out the old installer (ever wonder where the option for installing SciTE went?) in favor of packaging now being done by the kind folks at RubyInstaller.

Besides just providing newer/better Ruby for Windows, the RubyInstaller team has also been working on the RubyInstaller Development Kit (DevKit), an add-on for building native extensions under Windows. You'll find a download link for DevKit here and instructions for installation here.

Installing DevKit is pretty easy. It amounts to just extracting some files to your Ruby install path. Once done, building native extension just works (at least the ones I tried). This is great for gems like ruby-debug-ide which haven't been shipping pre-compiled Windows extensions with the latest releases.

It looks like RubyInstallers first stable releases came out around March of this year. I didn't notice it until now, but I'm glad someone is putting in the effort to make Windows Ruby development more seamless.