Fix broken pagination.
Update gems.

Fix all newly reported rubocop issues.