Try installing gems without sudo.