make sure rdoc is installed before generating gems, fix #1781