voormedia / rails-erd

Generate Entity-Relationship Diagrams for Rails applications
http://voormedia.github.io/rails-erd/
MIT License
3.97k stars 363 forks source link

`rake erd filetype=dot` : Unable to find GraphViz's "dot" executable. #273

Open RemyMaucourt opened 7 years ago

RemyMaucourt commented 7 years ago

I'm using rails-erd in a Docker container, who don't have graphviz installed. So I'm creating my erd graphs in two steps:

  1. docker-compose run web rake erd filetype=dot orientation=vertical attributes=foreign_keys,content
  2. dot -Tpdf erd.dot -o docs/graphs_erd/file_name.pdf

When I was using version 1.5.0, everything was fine. Since I upgraded to 1.5.2, I can't do the first step anymore: I got this error:

rake aborted!
Unable to find GraphViz's "dot" executable. Please visit https://voormedia.github.io/rails-erd/install.html for installation instructions.

I get the same result with the simple command rake erd filetype=dot.

kerrizor commented 7 years ago

That error occurs when the task can not find dot in $PATH. If you don't have dot on your machine, I'm not sure there's a difference between 1.5.0 and 1.5.2 that would allow your 2nd command to work if dot is not installed.

kerrizor commented 7 years ago

(sorry, accidentally closed..)

RemyMaucourt commented 7 years ago

Well, I just downgraded to 1.5.0, and it's working now.

And it was failing at the first command. It was rake erd that outputed Unable to find GraphViz's "dot" executable. I had dot installed on my local machine from the start.

It looks like the rake erd command now depends on dot executable. It's a major problem for me with my docker setup. I don't need/want to install dot in my container.

Anyway, 1.5.0 is working for me.

morulaus commented 6 years ago

same here, after having issues with 1.5.2 had to roll back to 1.5.0 and everything started to work

devdudeio commented 6 years ago

problem still exists on 1.5.2

kerrizor commented 6 years ago

@rlech @raviale are you using $ rake erd or $ erd?

pmokariya commented 6 years ago

I used this " rake erd " for the output but still getting this same error. How to solve it?

kerrizor commented 6 years ago

@pmokariya if you could, try using $ erd and see if it gives you different results.

alvaroscelza commented 5 years ago

Just in case anyone ends up here like I did. Try adding dot.exe folder (in Windows, after installing Graphviz with the msi file, it's located in C:\Program Files (x86)\Graphviz2.38\bin) to path variable.

Restart your system <- important

Nimdis commented 3 years ago

I use nix-shell with this gem. Had the same issue. bundle binstubs rails-erd and then calling ./bin/erd solved my problem