sstephenson/ruby-build — pull request #629 by mislav (2014-09-08 16:34:58+00:00)
Title: Check that openssl, yaml, readline, zlib are all loadable

Before, we detected whether `require "openssl"` works after compiling Ruby 2.0.0+ and failed the build if the openssl extension never compiled. This change extends this practice to zlib, yaml and readline as well since we consider these to be essential packages for most Ruby development. Rubygems won't work, for instance, without zlib.

This also suggests how you could install necessary dependencies if a package manager `apt-get` or `yum` is detected on the system.

Example output:

The Ruby zlib extension was not compiled.
The Ruby openssl extension was not compiled.
ERROR: Ruby install aborted due to missing extensions
Try running `apt-get install -y libssl-dev zlib1g-dev` to fetch missing dependencies

Potential downsides:

- Maybe some people don't need stuff like readline or zlib and are fine if these aren't compiled?
- With this, `verify_openssl` function becomes a misnomer since it verifies more stuff than just openssl.

How does everyone feel about this?