I was getting a strange error each time I ran "gem build tic_tac_toe.gemspec" in order to build a gem I was working.
I had no idea where document was coming from. With a bit of google-fu I learnt about the gemrc file. A configuration file that hosts info about your gem files. Its hosted in your local user directory.
On the Mac its located at:
Within this file I found
gem: --no document
Im not sure why that was there, so I backed up the config file then removed the line and voila gem build worked!
Here is a link to a sample gemrc file