Ruby-Graphwiz does not render png

Posted by auralbee on Stack Overflow See other posts from Stack Overflow or by auralbee
Published on 2010-05-11T20:37:00Z Indexed on 2010/05/12 14:54 UTC
Read the original article Hit count: 225

Filed under:
|

I just tried the ruby-graphwiz gem (http://github.com/glejeune/Ruby-Graphviz). I followed the instructions (installed Graphwiz, gem and dependencies) and tried the example from the Github page. Unfortunately I am not able to render any output image (png,dot).

# Create a new graph
g = GraphViz.new( :G, :type => :digraph )

# Create two nodes
hello = g.add_node( "Hello" )
world = g.add_node( "World" )

# Create an edge between the two nodes
g.add_edge( hello, world )

# Generate output image
g.output( :png => "hello_world.png" )

When I run the skript from the console I get no error message but also no output as expected.

What could be the problem? Folders have read/write access for everybody.

Thanks in advance. By the way, I´m working on a Mac (Leopard 10.6).

© Stack Overflow or respective owner

Related posts about ruby

Related posts about rubygems