{"record":{"id":"9710ea72605e47d0","repo":"voormedia/rails-erd","slug":"the-ruby-graphviz-gem-is-required-for-graphviz-out-9710ea","errorCode":null,"errorMessage":"The ruby-graphviz gem is required for Graphviz output. Add `gem 'ruby-graphviz'` to your Gemfile, or use `generator=mermaid` instead.","messagePattern":"The ruby-graphviz gem is required for Graphviz output\\. Add `gem 'ruby-graphviz'` to your Gemfile, or use `generator=mermaid` instead\\.","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"lib/rails_erd/tasks.rake","lineNumber":18,"sourceCode":"module ErdRakeHelper\n  def say(message)\n    puts message unless Rake.application.options.silent\n  end\nend\n\nnamespace :erd do\n  task :check_dependencies do\n    if RailsERD.options.generator == :graphviz\n      begin\n        require 'graphviz/utils'\n        include GraphViz::Utils\n        unless find_executable(\"dot\", nil)\n          raise \"Unable to find GraphViz's \\\"dot\\\" executable. Please \" \\\n                \"visit https://voormedia.github.io/rails-erd/install.html for installation instructions.\"\n        end\n      rescue LoadError\n        raise \"The ruby-graphviz gem is required for Graphviz output. \" \\\n              \"Add `gem 'ruby-graphviz'` to your Gemfile, or use `generator=mermaid` instead.\"\n      end\n    end\n  end\n\n  task :options do\n    (RailsERD.options.keys.map(&:to_s) & ENV.keys).each do |option|\n      RailsERD.options[option.to_sym] = case ENV[option]\n      when \"true\", \"yes\" then true\n      when \"false\", \"no\" then false\n      when /,/ then ENV[option].split(/\\s*,\\s*/)\n      when /^\\d+$/ then ENV[option].to_i\n      else\n        if option == 'only'\n          [ENV[option]]\n        else\n          ENV[option].to_sym\n        end","sourceCodeStart":1,"sourceCodeEnd":36,"githubUrl":"https://github.com/voormedia/rails-erd/blob/dae6e52018c94ff6d3e3bb0fdbc2cb0c680ec165/lib/rails_erd/tasks.rake#L1-L36","documentation":"Error \"The ruby-graphviz gem is required for Graphviz output. Add `gem 'ruby-graphviz'` to your Gemfile, or use `generator=mermaid` instead.\" thrown in voormedia/rails-erd.","triggerScenarios":"Raised in erd:check_dependencies when generator=graphviz but requiring 'graphviz/utils' fails with LoadError because the ruby-graphviz gem is not installed or not in the bundle.","commonSituations":"See trigger scenarios.","solutions":["Add `gem 'ruby-graphviz'` to your Gemfile and run `bundle install`, then re-run `bundle exec rake erd`.","Use the mermaid generator instead, which does not need ruby-graphviz: `bundle exec rake erd generator=mermaid`."],"exampleFix":"echo \"gem 'ruby-graphviz'\" >> Gemfile && bundle install","handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"dae6e52018c94ff6d3e3bb0fdbc2cb0c680ec165","analyzedAt":"2026-08-23T02:52:18.679Z","schemaVersion":2},"datasetVersion":"2026-08-23T08:06:27.607Z"}