glejeune / Ruby-Graphviz

[MIRROR] Ruby interface to the GraphViz graphing tool
https://gitlab.com/glejeune/ruby-graphviz
Other
608 stars 116 forks source link

Graphviz install problem #148

Closed weili-git closed 4 years ago

weili-git commented 4 years ago

require 'ruby-graphviz' g = GraphViz.new( :G, :type => :digraph ) hello = g.add_nodes( "Hello" ) world = g.add_nodes( "World" ) g.add_edges( hello, world ) g.output( :png => "hello_world.png" )

when I ran basic example, I got errors below: (tested both on win10 and ubuntu-18.04, ruby-2.6.5)

Traceback (most recent call last): 1: from test.rb:6:in <main>' /home/smile/.rvm/gems/ruby-2.6.5@gen1/gems/ruby-graphviz-1.2.5/lib/graphviz.rb:550:inoutput': GraphViz not installed or dot not in PATH. Install GraphViz or use the 'path' option (StandardError)

how could I fix this problem, thanks a lot.

glejeune commented 4 years ago

As it say, you need to install GraphViz.