按照使用 rspec_api_documentation 设置 aptitome的说明进行操作时,我收到以下错误:
uninitialized constant RspecApiDocumentation
我该如何解决?
按照使用 rspec_api_documentation 设置 aptitome的说明进行操作时,我收到以下错误:
uninitialized constant RspecApiDocumentation
我该如何解决?
我通过删除配置并根据此博客spec_helper.rb
设置初始化程序来解决它,即
# config/initializers/rspec_api_documentation.rb
RspecApiDocumentation.configure do |config|
# Output folder
config.docs_dir = Rails.root.join("doc", "api")
# An array of output format(s).
# Possible values are :json, :html, :combined_text, :combined_json,
# :json_iodocs, :textile, :markdown, :append_json
config.format = [:json]
end