Corrected to properly do the rails version check

Corrected the version check, initial fix was incorrect.