[Rubygems-developers] RubyGems install plugins

Jon jon.forums at gmail.com
Tue Nov 16 10:41:46 EST 2010

> 1) Before install, after download, "pre-install".  I'm not sure what this would be used for.  The hook should be able to abort the install.

FYI, as part of RubyInstaller's DevKit (MSYS+MinGW convenience build toolkit for Windows users) we use the pre-install hook [1] to temporarily inject toolchain artifacts into PATH and other ENV vars so as to limit their scope to just building the native extension.

Once the pre-install hook is installed via an operating_system.rb, a user can typically do a "gem install rdiscount --platform=ruby" and things just work.

The pre-install hook has worked great so far to allow MRI Window's users to use native extensions that don't have binary gems, and I'm in the process of testing my updates with JRuby's recent C-extension capabilities.  DevKit support for 64-bit and Rubinius is also being investigated which will also use RubyGems pre-install hook.


[1] https://github.com/oneclick/rubyinstaller/blob/dk32-451/resources/devkit/dk.rb.erb#L64-80

More information about the Rubygems-developers mailing list