Use NameError#name to assert raised error.

This makes the test compatible with other Ruby implementations, which
may implement error messages differently.
Upgraded rack
As Rack has some non backwards compatible changes added required
modifications to keep behaviour in rails close to same as before.

Also modified generators to include rack/rack for not yet released
version of rack
Since upgrading rack we can remove unnecessary string encodings
https://github.com/rack/rack/commit/5a5aee36
[ci skip] Add return values to examples
[ci skip] Consolidate docs for `first`

Add docs for `first` when provided a numerical argument. 

Since `first!` behaves exactly the same way but can raise an argument we can consolidate it in the `first` section.
[ci skip] Consolidate docs for `find_by`

Since `find_by!` behaves exactly the same way but can raise an argument we can consolidate it in the `find_by` section.
[ci skip] Consolidate docs for `take`

Add docs on what happens when a numerical argument is provided to take.

Since `take!` behaves exactly the same way but can raise an argument we can consolidate it in the `take` section.
[ci skip] Consolidate docs for `last`

Add docs on what happens when a numerical argument is provided to last.

Since `last!` behaves exactly the same way but can raise an argument we can consolidate it in the `last` section.
[ci skip] Consolidate docs for `find`

Put all options for overloading `find` in one section
[ci skip] Doc ability to chain in `find_each`

Also use appropriate mailer syntax in the `find_each` block.
[ci skip] Fix doc for except

The example showed is `except`, however the method "documented" is `unstop`. Fix to align the docs to the example.
[ci skip] remove invalid code from docs
[ci skip] add guide for ActiveModel::Naming
active_record: Type cast booleans and durations for string columns.
Merge pull request #16069 from dylanahsmith/mysql-quote-bool

active_record: Type cast booleans and durations for string columns.
Generate shallow paths for all children of shallow resources.

Prior to this commit shallow resources would only generate paths for
non-direct children (with a nested depth greater than 1).

Take the following routes file.

    resources :blogs do
      resources :posts, shallow: true do
        resources :comments do
          resources :tags
        end
      end
    end

This would generate shallow paths for `tags` nested under `posts`,
e.g `/posts/:id/tags/`, however it would not generate shallow paths
for `comments` nested under `posts`, e.g `/posts/:id/comments/new`.

This commit changes the behaviour of the route mapper so that it
generate paths for direct children of shallow resources, for example
if you take the previous routes file, this will now generate
shallow paths for `comments` nested under `posts`, .e.g
`posts/:id/comments/new`.

This was the behaviour in Rails `4.0.4` however this was broken in
@jcoglan's fix for another routes related issue[1].

This also fixes an issue[2] reported by @smdern.

[1] https://github.com/rails/rails/commit/d0e5963
[2] https://github.com/rails/rails/issues/15783
[ci skip] /sqlite/i --> SQLite
Merge pull request #15958 from aditya-kapoor/active-model-naming-guide

[ci skip] add guide for ActiveModel::Naming
Merge pull request #16057 from akshay-vishnoi/doc_change

[ci skip] /sqlite/i --> SQLite
Change back occurrences of SQLite(3) to sqlite3 when referring to the
adapter, fixed from #16057 [ci skip]