Distribute the future

Compiling latest Ruby

With the abundance of package managers and containers everywhere, it seems like very few people now compile anything at all. Putting this out there for any colleagues stumbling with compiling on Ruby.

If ever need to compile the latest Ruby on Ubuntu / Debian-based systems, and for me specifically Ruby 3.3.6, and you encounter strange build errors like:

/root/ruby-3.3.6/lib/yaml.rb:3: warning: It seems your ruby installation is missing psych (for YAML output). To eliminate this warning, please install libyaml and reinstall your ruby.

Or a similar need for openssl, zlib, or fiddle while compiling, besides build-essential, you should also install the required headers for these packages by:

apt install -y libyaml-dev libffi-dev libssl-dev zlib1g-dev

Then clean up your previous makefiles and simply re-compile by:

make clean && ./configure && make && make install

Thoughts? Leave a comment