rails/rails — pull request #15497 by schneems (2014-06-03 23:23:36+00:00)
Title: Emit suggested generator names when not found

When someone types in a generator command it currently outputs all generators. Instead we can attempt to find a subtle mis-spelling by running all generator names through a `levenshtein_distance` algorithm provided by rubygems (`Gem::Text`).

So now a failure looks like this:

```ruby
$ rails generate migratioooons
Could not find generator 'migratioooons'. Maybe you meant 'migration' or 'integration_test' or 'generator'
Run `rails generate --help` for more options.
```

If the suggestions are bad we leave the user with the hint to run `rails generate --help` to see all commands.