Change rails dependency to >= 3.1