Improve checks when intalling ruby