Backport doc updates and remove RubyGem dependency

Backports the following PRs from `master` (i.e. 3.1.x):

- #1093
- #1099
- #1102