refactored rails installation to external class