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. It’s hosted in your local user directory.

On the Mac it’s located at:


Within this file I found

gem: --no document

I’m 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