Fix gems and git installation