How to solve “undefined method `documentations’ for RspecApiDocumentation:Module”

Photo by Jake Walker on Unsplash
If you encounter the following problem while using rspec_api_documentation gem:
/usr/local/bundle/gems/rspec_api_documentation-6.1.0/lib/rspec_api_documentation/api_formatter.rb:16:in `start': undefined method `documentations' for RspecApiDocumentation:Module (NoMethodError)
RspecApiDocumentation.documentations.each(&:clear_docs)
Try to add this at the top of spec/spec_helper.rb file:




