Fix docgen with correct path to gem's

Fixes #2251