rails-erd icon indicating copy to clipboard operation
rails-erd copied to clipboard

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

Open RemyMaucourt opened this issue 7 years ago • 10 comments

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.

RemyMaucourt avatar Jun 16 '17 16:06 RemyMaucourt

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 avatar Jun 16 '17 18:06 kerrizor

(sorry, accidentally closed..)

kerrizor avatar Jun 16 '17 18:06 kerrizor

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.

RemyMaucourt avatar Jun 19 '17 08:06 RemyMaucourt

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

morulaus avatar Dec 05 '17 19:12 morulaus

problem still exists on 1.5.2

devdudeio avatar Jan 05 '18 10:01 devdudeio

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

kerrizor avatar Jan 12 '18 10:01 kerrizor

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

pmokariya avatar Mar 28 '18 07:03 pmokariya

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

kerrizor avatar Apr 24 '18 04:04 kerrizor

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

alvaroscelza avatar Feb 16 '19 02:02 alvaroscelza

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

Nimdis avatar Oct 29 '20 07:10 Nimdis