Fixes _rails_command

Changes precedence of the conditional clause, more recent versions come
first now. Fixes problems when users update their app and still have
the old rails files inside of their file tree.
Closes #2405 - check the discussion there for further info.
Merge pull request #2421 from LFDM/rails_plugin_fix

Fixes _rails_command in new rails plugin