Refactored ruby installation