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)
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:in
output': 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.