Ruby gem exception: invalid option
Below is my ‘quick fix’ (bandaid) solution to the following errors/exceptions.
Error: Execution of '/usr/bin/gem install --no-rdoc --no-ri cowsay' returned 1: ERROR: While executing gem ... (OptionParser::InvalidOption)invalid option: --no-rdocDid you mean? no-force
A reference article https://github.com/puphpet/puphpet/issues/2838
The ‘quick fix’
W.r.t. the reference article, I searched for the file ‘gem.rb’. Since ‘locate’ was not installed in the OS, I used the ‘find’ command to look for the file:
> find / -name 'gem.rb'
In the gem.rb file, I found the line throwing the exception and made the following modification:
#command << "--no-rdoc" << "--no-ri" << resource[:name]
command << "--no-document" << resource[:name]