Revert "Use ruby library"

This reverts commit d1eb6e3dd68811700704c6d22a8a14963e4ff64c.