Fix rails version check