changes mage to gem file