Closed benzelano closed 13 years ago
Sounds like a problem with the Darwin package. A quick Google search reveals the following: http://blog.grogmaster.com/2008/12/installing-graphziv-on-mac-os-x.html
Can you try following those instructions and seeing if it fixes the problem? Unfortunately, I don’t have access to a Mac.
Pete Forde commented
Hey Aaron,
You nailed it. Sorry for troubling you with this; that said, between the darwin issue and the rake tasks not working, I suspect that I’m the only one who’s used this functionality.
At any rate, I got it going, and it generally works well.
Admittedly I’ve only generated graphs by running the rake task from the root library folder or by calling #draw directly on the state machine from the Rails console.
Thanks for the bug report, though... I’m sure it’ll help others who run into the same problem.
I’ll have to see if I can improve the readability of some of those states.
I’ve tweaked the drawing algorithm a bit to accommodate states with long names: http://github.com/pluginaweek/state_machine/commit/d6fbdcc10127ab166c13628f12fd6c6e81ccf5cf
Hopefully this’ll generate slightly more readable graphs in the future. I’ve attached the graph that’s generated based on the Booking class provided in the ticket.
Pete Forde commented
That’s awesome, Aaron!
Huge improvement.
Pete Forde opened this issue
I’ve installed the graphviz darwin package, and the graphviz-ruby gem.
I created a very simple class to test the state_machine:draw:rails functionality, and this is what I get:
original LH ticket
This ticket has 5 attachment(s).