fix ruby to console code