Fix Rails version condition