choose pkg manager to use based on the OS distro
Instead of looking for which package manager is installed, ruby-install should look into the OS distro and map the package manager to use based on the OS. See #211
An example: you could use a mix of $OSTYPE, and lsb_release that will give you if its a linux/osx box and which distro it is.
echo $OSTYPE linux-gnu
lsb_release -i Distributor ID: ManjaroLinux
and this: http://unix.stackexchange.com/questions/6345/how-can-i-get-distribution-name-and-version-number-in-a-simple-shell-script
It's really easy to end up with complex code like this: https://github.com/postmodern/chruby/blob/66e4cfb647acd5901028f0463b0c1704082dc1e9/test/setup#L39-L150 (originally from RVM 1). I would prefer simple code that checks what flavor we are on (Linux vs. BSD, Debian vs. RedHat, OSX vs. FreeBSD).