gemhome / rails-erd

retired fork, DO NOT USE. see https://github.com/voormedia/rails-erd
MIT License
0 stars 0 forks source link

Generation hangs #21

Open bf4 opened 10 years ago

bf4 commented 10 years ago

Issue by devatotech Saturday Nov 16, 2013 at 15:14 GMT Originally opened as https://github.com/voormedia/rails-erd/issues/63


It just chills here for hours and the pdf if empty

Generating entity-relationship diagram for 16 models...

bf4 commented 10 years ago

Comment by kpgdev Thursday Nov 21, 2013 at 15:06 GMT


yup - i am seeing this. i think it's a mavericks & 2.34 issue....

here's the output from ctrl c:

/.rvm/gems/ruby-2.0.0-p247/gems/ruby-graphviz-1.0.9/lib/graphviz/utils.rb:62:in read' /.rvm/gems/ruby-2.0.0-p247/gems/ruby-graphviz-1.0.9/lib/graphviz/utils.rb:62:inblock in output_and_errors_from_command' /.rvm/gems/ruby-2.0.0-p247/gems/ruby-graphviz-1.0.9/lib/graphviz/utils.rb:59:in output_and_errors_from_command' /.rvm/gems/ruby-2.0.0-p247/gems/ruby-graphviz-1.0.9/lib/graphviz/utils.rb:73:inoutput_from_command' /.rvm/gems/ruby-2.0.0-p247/gems/ruby-graphviz-1.0.9/lib/graphviz.rb:589:in output' /.rvm/gems/ruby-2.0.0-p247/gems/rails-erd-1.1.0/lib/rails_erd/diagram/graphviz.rb:192:inblock in class:Graphviz' /.rvm/gems/ruby-2.0.0-p247/gems/rails-erd-1.1.0/lib/rails_erd/diagram.rb:142:in instance_eval' /.rvm/gems/ruby-2.0.0-p247/gems/rails-erd-1.1.0/lib/rails_erd/diagram.rb:142:insave' /.rvm/gems/ruby-2.0.0-p247/gems/rails-erd-1.1.0/lib/rails_erd/diagram.rb:120:in create' /.rvm/gems/ruby-2.0.0-p247/gems/rails-erd-1.1.0/lib/rails_erd/diagram.rb:74:increate' /.rvm/gems/ruby-2.0.0-p247/gems/rails-erd-1.1.0/lib/rails_erd/tasks.rake:41:in `block (2 levels) in <top (required)>'

bf4 commented 10 years ago

Comment by nicholasjhenry Friday Nov 22, 2013 at 16:57 GMT


Workaround:

rake erd filetype=dot
dot -Tpdf erd.dot > erd.pdf
bf4 commented 10 years ago

Comment by kpgdev Friday Nov 22, 2013 at 17:24 GMT


awesome thanks

bf4 commented 10 years ago

Comment by rrotteveel Monday Nov 25, 2013 at 15:56 GMT


Thanks @nicholasjhenry, this worked for me too. And I have the same output as @kpgdev, and I'm also running Mavericks & 2.34.

bf4 commented 10 years ago

Comment by darren-james Wednesday Dec 25, 2013 at 04:32 GMT


Me too. I've been missing being able to use the diagrams for a couple of months since upgrading. Perhaps you could put this advice on the main page?

bf4 commented 10 years ago

Comment by rockaBe Thursday Feb 06, 2014 at 23:25 GMT


thanks a lot @nicholasjhenry ! Your workaround did the trick for me as well :+1:

bf4 commented 10 years ago

Comment by caseywatts Thursday Feb 20, 2014 at 21:56 GMT


:+1: me too!

bf4 commented 10 years ago

Comment by charlesdg Wednesday Feb 26, 2014 at 11:43 GMT


+1 for @nicholasjhenry

bf4 commented 10 years ago

Comment by okuramasafumi Friday Feb 28, 2014 at 04:14 GMT


Thanks @nicholasjhenry it works perfect.

bf4 commented 10 years ago

Comment by barttenbrinke Wednesday Apr 23, 2014 at 16:34 GMT


Thanks!

bf4 commented 10 years ago

Comment by joshuapinter Wednesday Apr 23, 2014 at 16:36 GMT


:thumbsup: Awesome, thanks.

bf4 commented 10 years ago

Comment by datenimperator Wednesday Apr 30, 2014 at 12:30 GMT


I also ran into this. Any chance this could be solved?

bf4 commented 10 years ago

Comment by stringsn88keys Wednesday Apr 30, 2014 at 14:06 GMT


I spent a bit of time looking at this, and if you run the command built in ruby-graphviz-1.0.9/lib/graphviz.rb:589 in a separate shell while debugging, the pdf generates just fine.

ruby-graphviz seems to be getting hung up on the call to popen_run in open3.rb ruby 2.1.1 for me. This may need written up in ruby-graphviz (or maybe ruby 2.1, but seems like there would be more problems elsewhere in that case).

bf4 commented 10 years ago

Comment by nitin007 Wednesday May 21, 2014 at 18:14 GMT


me too :)

bf4 commented 10 years ago

Comment by ericbrooke Thursday May 22, 2014 at 04:54 GMT


:thumbsup: thank you

bf4 commented 10 years ago

Comment by thierrycorbin Sunday Jun 01, 2014 at 12:07 GMT


Thanks for the workaround.

bf4 commented 10 years ago

Comment by vladCovaliov Tuesday Jul 01, 2014 at 06:45 GMT


This solution works but the diagram doesn't have STI.

A workaround:

erd --inheritance --direct --attributes=foreign_keys,content --filetype=dot
dot -Tpdf erd.dot > erd.pdf

I would also like to thank @nicholasjhenry.