Fix detection of installed rails versions

The regular expression for finding the installed versions of rails used to match gems like readcrumbs_on_rails instead of rails.
Therefore the script was unable to determine the correct versions of rails and quitted.