Fix document link gem paths when to_spec returns nil
#4060
+17
−0
to_spec returns nil
#4060